public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Göktürk Yüksek" <gokturk@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/sleuthkit/
Date: Tue, 27 Jun 2023 04:11:15 +0000 (UTC)	[thread overview]
Message-ID: <1687839057.82bb74bfe9e99727aed9da3e31d9a0b4afc652c3.gokturk@gentoo> (raw)

commit:     82bb74bfe9e99727aed9da3e31d9a0b4afc652c3
Author:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 27 04:09:41 2023 +0000
Commit:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 04:10:57 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82bb74bf

app-forensics/sleuthkit: add 4.12.0

Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>

 app-forensics/sleuthkit/Manifest                |   2 +
 app-forensics/sleuthkit/sleuthkit-4.12.0.ebuild | 325 ++++++++++++++++++++++++
 2 files changed, 327 insertions(+)

diff --git a/app-forensics/sleuthkit/Manifest b/app-forensics/sleuthkit/Manifest
index 03ea8d0f9d44..9f7b3977862f 100644
--- a/app-forensics/sleuthkit/Manifest
+++ b/app-forensics/sleuthkit/Manifest
@@ -1,4 +1,6 @@
 DIST sleuthkit-4.10.1.tar.gz 3524246 BLAKE2B ddea16693730a993032868ea60423d4bfcf3cba470010854c7bd36ab0a033325d906a0e4760501d59fdda4f37e12052f8672d33e4e374d1a6cdb03e22d0de367 SHA512 3ee335ba98bbb16985207ad50bc15a607ea2bcf550bba392be1cace8982c893a29e9de64e6598d02f41f9f745dc720f829317ed31f068e6cb1f6c230699e47bf
 DIST sleuthkit-4.11.1.tar.gz 3718417 BLAKE2B 4ce1fa68f770e61942e00e6a05ac751afdd7f33d781ec1069e9a8cb9a27d22f0ed506e9affeaddaf9ecfa98e6d30f468314b5a00d35b20ba01fc312765dbef14 SHA512 04e4ca1c18bda56c816aa493eb3b887f2f62162e16c35079d4208b89464a78109fc189fec55ea6db8a60ab01a4e46c87902f00286abee203ff0c53ab572cfeda
+DIST sleuthkit-4.12.0.tar.gz 3760659 BLAKE2B 177b4b8ca9b843b814ab3a5a43079e05ca328b090b0aa9405f57f5fa4b57c7623739dce70ea8ad51e1e23f5d9f4f2565d713fc5fb1d4fa8e6916e19e8ef36d9a SHA512 9f20eb42d1dd7d0e15d49a4b6c18441cd31d2343fe34bc7fad1a6b6fe344b414efe959a4f7e34f5368a6efafeecbf39655648a9a3045b437a747c726134c77dc
 DIST sleuthkit-libewf_64bit-20130416.tar.gz 23818247 BLAKE2B 23be933ed8a74e4834ee6571a28d81ba16e98e4e4e27b5b1b3b655d1d92a6eadcba35aadf96aa404e6e0a225b27f3f5daff2836879b87fe58440a3ad5645de44 SHA512 611cbb57de17600caee0330bbe9917c4481d7711a35dba8c072fd49cd3e1714e0a3ce30fd8fcac9981db848e80870bf5d215326c56808bb6f5b4c8dcc1e5a3c9
 DIST sqlite-jdbc-3.25.2.jar 7064881 BLAKE2B 3917da6127137bab710a9e61f326f59320ce94654ebb8ae5e694b05aed6b9b1bd367ade2f08ce5bb52c3ac296992240ad949969f5eff712615d07a18588c6a17 SHA512 efd1ea26d7f4f9bc66bf0d5f80234a0c535829bd498e4c5a0cab42873b58ac69133497d8c45689a1d3a39e657a2d0474d6b930c7bc415dd623801ee4a7354ffb
+DIST sqlite-jdbc-3.36.0.3.jar 9731064 BLAKE2B 5a2e55c95f0bc648b4a93eb38905ceee92558306166f837adf902a341f83d9c73ea26cc788fbe4d93d445e252c268edd15d2e55a546b5937ba0d8c7a5df3a836 SHA512 32e789a0dd37c848e927f3afa7fa1820163c165830ce01e9f341f6e01733b3311d034d004030541d6fc574ae54204c39c96d0d68f9dd4c88094147cf32a2681f

diff --git a/app-forensics/sleuthkit/sleuthkit-4.12.0.ebuild b/app-forensics/sleuthkit/sleuthkit-4.12.0.ebuild
new file mode 100644
index 000000000000..bca5e7d4bd6a
--- /dev/null
+++ b/app-forensics/sleuthkit/sleuthkit-4.12.0.ebuild
@@ -0,0 +1,325 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_BSFIX_NAME="build.xml build-unix.xml"
+inherit autotools java-pkg-opt-2 java-ant-2
+
+DESCRIPTION="A collection of file system and media management forensic analysis tools"
+HOMEPAGE="https://www.sleuthkit.org/sleuthkit/"
+# TODO: sqlite-jdbc does not exist in the tree, we bundle it for now
+#		See: https://bugs.gentoo.org/690010
+# TODO: Upstream uses a very specific version of libewf which is not in
+#       the tree anymore. So we statically compile and link to sleuthkit.
+#       Hopefully upstream will figure something out in the future.
+#		See: https://bugs.gentoo.org/689752
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz
+	java? (
+		https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.36.0.3/sqlite-jdbc-3.36.0.3.jar
+	)
+	ewf? ( https://github.com/sleuthkit/libewf_64bit/archive/VisualStudio_2010.tar.gz -> sleuthkit-libewf_64bit-20130416.tar.gz )"
+
+LICENSE="BSD CPL-1.0 GPL-2+ IBM java? ( Apache-2.0 )"
+SLOT="0/19" # subslot = major soname version
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE="aff doc ewf java static-libs test +threads zlib"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	dev-db/sqlite:3
+	dev-lang/perl:*
+	aff? ( app-forensics/afflib )
+	ewf? ( sys-libs/zlib )
+	java? (
+		>=dev-java/c3p0-0.9.5.5:0
+		dev-java/commons-lang:3.6
+		>=dev-java/commons-validator-1.6:0
+		>=dev-java/gson-2.8.5:2.6
+		dev-java/guava:0
+		>=dev-java/jdbc-postgresql-9.4:0
+		>=dev-java/joda-time-2.4:0
+		>=dev-java/mchange-commons-0.2.20:0
+		dev-java/sparsebitset:0
+	)
+	zlib? ( sys-libs/zlib )
+"
+# TODO: add support for not-in-tree libraries:
+# libvhdi: https://github.com/libyal/libvhdi
+# libvmdk: https://github.com/libyal/libvmdk
+# libvslvm: https://github.com/libyal/libvslvm
+#   Upstream also says "A stand-alone version of libbfio is needed
+#   to allow libvslvm to directly read from a TSK_IMAGE." Not sure
+#   what it means yet.
+#
+# DEPEND="${DEPEND}
+# 	vhdi? ( dev-libs/libvhdi )
+# 	vmdk? ( dev-libs/libvmdk )
+#   vslvm? ( dev-libs/libvslvm dev-libs/libbfio )
+# "
+
+RDEPEND="${DEPEND}
+	java? ( virtual/jre:1.8 )
+"
+DEPEND="${DEPEND}
+	java? ( virtual/jdk:1.8 )
+	test? (
+		>=dev-util/cppunit-1.2.1
+	)
+"
+BDEPEND="
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.1.0-tools-shared-libs.patch
+	"${FILESDIR}"/${PN}-4.6.4-default-jar-location-fix.patch
+	"${FILESDIR}"/${PN}-4.10.1-exclude-usr-local.patch
+)
+
+src_unpack() {
+	local f
+
+	unpack ${P}.tar.gz
+
+	if use ewf; then
+		pushd "${T}" &>/dev/null || die
+		unpack sleuthkit-libewf_64bit-20130416.tar.gz
+		export TSK_LIBEWF_SRCDIR="${T}"/libewf_64bit-VisualStudio_2010
+		popd &>/dev/null || die
+	fi
+
+	# Copy the jar files that don't exist in the tree yet
+	if use java; then
+		TSK_JAR_DIR="${T}/lib"
+		mkdir "${TSK_JAR_DIR}" || die
+		for f in ${A}; do
+			if [[ ${f} =~ .jar$ ]]; then
+				cp "${DISTDIR}"/"${f}" "${TSK_JAR_DIR}" || die
+			fi
+		done
+		export TSK_JAR_DIR
+	fi
+}
+
+tsk_prepare_libewf() {
+	# Inlining breaks the compilation, disable it
+	sed -e 's/LIBUNA_INLINE inline/LIBUNA_INLINE/' \
+		-i "${TSK_LIBEWF_SRCDIR}"/libuna/libuna_inline.h || die
+}
+
+src_prepare() {
+	use ewf && tsk_prepare_libewf
+
+	# Do not pass '-Werror'. This is overkill for user builds.
+	sed -e '/AM_CXXFLAGS/ s/-Werror//g' \
+		-i tsk/util/Makefile.am \
+		-i tsk/pool/Makefile.am || die
+	# Remove -static from LDFLAGS because it doesn't actually create
+	# a static binary. It confuses libtool, who then inserts rpath
+	sed -e '/LDFLAGS/ s/-static//' \
+		-i tools/pooltools/Makefile.am || die
+
+	if use java; then
+		pushd "${S}"/bindings/java &>/dev/null || die
+
+		# Prevent "make install" from installing
+		# jar files under /usr/share/java
+		# We'll use the java eclasses for this
+		# See: https://github.com/sleuthkit/sleuthkit/pull/1379
+		sed -e '/^jar_DATA/ d;' -i Makefile.am || die
+
+		java-pkg-opt-2_src_prepare
+
+		popd &>/dev/null || die
+
+		# Call ant with jar target for case-uco.
+		# The default invocation of ant tries to
+		# run junit tests, which there are none.
+		# It ends up failing with:
+		# junit.framework.AssertionFailedError: No tests found in org.sleuthkit.caseuco.TestSuite
+		sed -e '/\tant \$(ant_args)/ s|$| jar|' \
+			-i "${S}"/case-uco/java/Makefile.am \
+			|| die
+	fi
+
+	# Override the doxygen output directories
+	if use doc; then
+		sed -e "/^OUTPUT_DIRECTORY/ s|=.*$|= ${T}/doc|" \
+			-i tsk/docs/Doxyfile \
+			-i bindings/java/doxygen/Doxyfile || die
+	fi
+
+	# It's safe to call this even after java-pkg-opt-2_src_prepare
+	# because future calls to eapply_user do nothing and return 0
+	default
+
+	eautoreconf
+}
+
+tsk_compile_libewf() {
+	local myeconfargs=(
+		--prefix=/
+		--libdir=/lib
+		--enable-static
+		--disable-shared
+		--disable-winapi
+		--without-libbfio
+		--with-zlib
+		--without-bzip2
+		--without-libhmac
+		--without-openssl
+		--without-libuuid
+		--without-libfuse
+
+		--with-libcstring=no
+		--with-libcerror=no
+		--with-libcdata=no
+		--with-libclocale=no
+		--with-libcnotify=no
+		--with-libcsplit=no
+		--with-libuna=no
+		--with-libcfile=no
+		--with-libcpath=no
+		--with-libbfio=no
+		--with-libfcache=no
+		--with-libfvalue=no
+
+	)
+	# We want to contain our build flags
+	local CFLAGS="${CFLAGS}"
+	local LDFLAGS="${LDFLAGS}"
+
+	pushd "${TSK_LIBEWF_SRCDIR}" &>/dev/null || die
+
+	# Produce relocatable code
+	CFLAGS+=" -fPIC"
+	LDFLAGS+=" -fPIC"
+	econf "${myeconfargs[@]}"
+
+	# Do not waste CPU cycles on building ewftools
+	sed -e '/ewftools/ d' -i Makefile || die
+	emake
+
+	# Only install the headers and the library
+	emake -C libewf DESTDIR="${T}"/image install
+	emake -C include DESTDIR="${T}"/image install
+	find "${T}"/image -name '*.la' -delete || die
+
+	popd &>/dev/null || die
+}
+
+src_configure() {
+	local myeconfargs=(
+		--enable-offline="${TSK_JAR_DIR}"
+		$(use_enable java)
+		$(use_enable static-libs static)
+		$(use_enable test cppunit)
+		$(use_enable threads multithreading)
+		$(use_with aff afflib)
+		$(use_with zlib)
+	)
+	# TODO: add support for non-existing libraries:
+	# myeconfargs+=(
+	# 	$(use_with vhdi libvhdi)
+	# 	$(use_with vmdk libvmdk)
+	# 	$(use_with vslvm libvslvm)
+	# 	$(use_with vslvm libbfio) # not a typo
+	# )
+	myeconfargs+=(
+		--without-libvhdi
+		--without-libvmdk
+		--without-libvslvm
+		--without-libbfio
+	)
+
+	use ewf && tsk_compile_libewf
+	myeconfargs+=( $(use_with ewf libewf "${T}"/image) )
+
+	if use java; then
+		pushd "${S}"/bindings/java &>/dev/null || die
+		java-ant-2_src_configure
+		popd &>/dev/null || die
+	fi
+
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	# Give it an existing bogus ivy home #672220
+	local -x IVY_HOME="${T}"
+
+	# Create symlinks of jars for the required dependencies
+	if use java; then
+		java-pkg_jar-from --into "${TSK_JAR_DIR}" c3p0
+		java-pkg_jar-from --into "${TSK_JAR_DIR}" commons-lang:3.6
+		java-pkg_jar-from --into "${TSK_JAR_DIR}" commons-validator
+		java-pkg_jar-from --into "${TSK_JAR_DIR}" gson:2.6
+		java-pkg_jar-from --into "${TSK_JAR_DIR}" guava
+		java-pkg_jar-from --into "${TSK_JAR_DIR}" jdbc-postgresql
+		java-pkg_jar-from --into "${TSK_JAR_DIR}" joda-time
+		java-pkg_jar-from --into "${TSK_JAR_DIR}" mchange-commons
+		java-pkg_jar-from --into "${TSK_JAR_DIR}" sparsebitset
+
+		# case-uco needs gson and expects it under case-uco/java/lib
+		# symlink it to the jar dir we create for java bindings
+		ln -s "${TSK_JAR_DIR}" "${S}"/case-uco/java/lib || die
+		ln -s ./gson.jar "${TSK_JAR_DIR}"/gson-2.8.5.jar || die
+	fi
+
+	# Create the doc output dirs if requested
+	if use doc; then
+		mkdir -p "${T}"/doc/{api-docs,jni-docs} || die
+	fi
+
+	emake all $(usex doc api-docs "")
+}
+
+src_install() {
+	# Give it an existing bogus ivy home #756766
+	local -x IVY_HOME="${T}"
+	local f
+
+	if use java; then
+		pushd "${S}"/bindings/java &>/dev/null || die
+
+		# Install case-uco
+		pushd "${S}"/case-uco/java &>/dev/null || die
+		java-pkg_newjar "dist/${PN}-caseuco-${PV}".jar "${PN}-caseuco.jar"
+		popd || die
+
+		# Install the bundled jar files as well as the
+		# sleuthkit jar installed here by case-uco
+		pushd "${TSK_JAR_DIR}" &>/dev/null || die
+		for f in *; do
+			# Skip the symlinks java-pkg_jar-from created
+			[[ -L ${f} ]] && continue
+
+			# Strip the version numbers as per eclass recommendation
+			[[ ${f} =~ -([0-9]+\.)+jar$ ]] || continue
+
+			java-pkg_newjar "${f}" "${f/${BASH_REMATCH[0]}/.jar}"
+		done
+		popd &>/dev/null || die
+
+		popd &>/dev/null || die
+	fi
+
+	default
+	# Default install target for case-uco installs the jar in the wrong place
+	rm -r "${ED}"/usr/share/java
+
+	# It unconditionally builds both api and jni docs
+	# We install conditionally based on the provided use flags
+	if use doc; then
+		dodoc -r "${T}"/doc/api-docs
+		use java && dodoc -r "${T}"/doc/jni-docs
+	fi
+
+	find "${D}" -name '*.la' -delete || die
+}
+
+src_test() {
+	emake -C "${S}"/unit_tests check
+}


             reply	other threads:[~2023-06-27  4:11 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27  4:11 Göktürk Yüksek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-11 17:47 [gentoo-commits] repo/gentoo:master commit in: app-forensics/sleuthkit/ Arthur Zamarin
2024-09-11 14:15 Sam James
2024-09-05 12:22 Sam James
2024-09-05 12:22 Sam James
2024-08-05  7:26 Göktürk Yüksek
2024-08-05  7:19 Göktürk Yüksek
2024-07-30 23:44 Jakov Smolić
2024-07-30 18:00 Arthur Zamarin
2024-07-30 18:00 Arthur Zamarin
2024-01-07  7:52 Göktürk Yüksek
2023-06-27  4:11 Göktürk Yüksek
2022-09-07  6:51 Jakov Smolić
2022-09-06 12:51 Agostino Sarubbo
2022-09-06 12:50 Agostino Sarubbo
2022-06-09  6:45 Sam James
2022-06-08  8:46 Agostino Sarubbo
2022-06-08  8:44 Agostino Sarubbo
2022-06-08  8:42 Agostino Sarubbo
2022-05-09 18:58 Florian Schmaus
2022-05-09 18:58 Florian Schmaus
2022-05-09 18:58 Florian Schmaus
2022-02-16  2:53 Göktürk Yüksek
2021-08-11  6:43 Agostino Sarubbo
2021-08-10 15:36 Agostino Sarubbo
2021-08-10  6:42 Agostino Sarubbo
2021-08-09 23:53 Göktürk Yüksek
2021-08-09 23:16 Göktürk Yüksek
2021-08-09 23:16 Göktürk Yüksek
2021-08-09 23:16 Göktürk Yüksek
2021-06-23 15:41 Göktürk Yüksek
2021-06-23  8:13 Miroslav Šulc
2021-06-23  8:13 Miroslav Šulc
2021-06-23  8:13 Miroslav Šulc
2021-06-23  8:13 Miroslav Šulc
2021-06-23  8:13 Miroslav Šulc
2020-11-26  3:26 Göktürk Yüksek
2020-11-25  2:29 Göktürk Yüksek
2020-06-20  1:11 Aaron Bauman
2020-06-18  2:46 Aaron Bauman
2020-06-09 13:53 Agostino Sarubbo
2020-06-09 13:49 Agostino Sarubbo
2020-06-09 13:45 Agostino Sarubbo
2020-05-09 19:43 Sergei Trofimovich
2020-05-06  0:51 Göktürk Yüksek
2020-05-06  0:07 Göktürk Yüksek
2020-01-25  0:54 Göktürk Yüksek
2019-10-15 23:21 Göktürk Yüksek
2019-08-05  4:43 Göktürk Yüksek
2019-08-05  4:43 Göktürk Yüksek
2019-06-05  0:02 Göktürk Yüksek
2019-01-24 20:18 Göktürk Yüksek
2018-12-19 17:08 Göktürk Yüksek
2018-11-29 18:00 Göktürk Yüksek
2018-04-22 19:18 Matt Turner
2018-04-04 11:24 Göktürk Yüksek
2018-03-03 22:16 Sergei Trofimovich
2017-11-29 18:52 Thomas Deutschmann
2017-11-29 11:19 Agostino Sarubbo
2017-11-09  0:06 Göktürk Yüksek
2017-11-08 23:56 Göktürk Yüksek
2017-11-08 23:53 Göktürk Yüksek
2017-08-16 22:53 Göktürk Yüksek
2017-08-16  3:07 Göktürk Yüksek
2017-08-16  3:07 Göktürk Yüksek
2017-08-11 17:38 Michał Górny
2015-08-28  0:14 Manuel Rüger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1687839057.82bb74bfe9e99727aed9da3e31d9a0b4afc652c3.gokturk@gentoo \
    --to=gokturk@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox