Gentoo Archives: gentoo-commits

From: "Göktürk Yüksek" <gokturk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/sleuthkit/
Date: Wed, 06 May 2020 00:07:22
Message-Id: 1588723617.811a39b416b02091e788a3788c6b3bad1396e4fb.gokturk@gentoo
1 commit: 811a39b416b02091e788a3788c6b3bad1396e4fb
2 Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 6 00:01:59 2020 +0000
4 Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
5 CommitDate: Wed May 6 00:06:57 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=811a39b4
7
8 app-forensics/sleuthkit: bump to 4.9.0
9
10 Bug: https://bugs.gentoo.org/711930
11 Package-Manager: Portage-2.3.69, Repoman-2.3.14
12 Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
13
14 app-forensics/sleuthkit/Manifest | 2 +
15 app-forensics/sleuthkit/sleuthkit-4.9.0.ebuild | 298 +++++++++++++++++++++++++
16 2 files changed, 300 insertions(+)
17
18 diff --git a/app-forensics/sleuthkit/Manifest b/app-forensics/sleuthkit/Manifest
19 index 56201777a04..6ae584f4429 100644
20 --- a/app-forensics/sleuthkit/Manifest
21 +++ b/app-forensics/sleuthkit/Manifest
22 @@ -1,4 +1,5 @@
23 DIST SparseBitSet-1.1.jar 23706 BLAKE2B 8623a723f11f97386a108c775fefddd324997b68bea7f7ade0581ec5800bfa8d32f699ab903ad66c631b7b5c69ba1ef377243653f5044f39234dac07543eb129 SHA512 cf75431c5f705961800ce5cbca2acb9b2459eaf98ec37b5ee21c5a90d204ffb466fa25457b0560fbb024489777efbea0276201024c7b1b2853124930ac490983
24 +DIST commons-validator-1.6.jar 186077 BLAKE2B 39080bebfde71d87847b65f212d47a51bab9567cb0aaf7122359a67a8eb817877a6cc80495a15aefb12936d0e36532ed771dc0a2dff8401fc301f658ed38ef88 SHA512 aded530d3b79ead6ba5c44668c6d6964d7721f9617249f6aaa1c8f558ad4b3d3c1b6d78b639a4cb8dd27a671879b662fdbba0502fd04e131f3286169507df30c
25 DIST gson-2.8.5.jar 241622 BLAKE2B b13887177b5d5f2a11b2dde1fdbaa3a95b55bb7b5500624c7eb0745e861c897ed1e27868bad19d30a1670c90f3068a8fd40e1b81e5e25e96819fa5c371a5e1af SHA512 5dd7214c542a7b93aab3eab0ba13e4ac3d6ddb05c795fb6d3992e21925a98dce87cb186ac67b4d3ad146f96e14d38b3892837eca57a27b4e845aca6d4e4f708a
26 DIST libewf-20130128.tar.gz 1978794 BLAKE2B e5d2bd8f4a8b878e13536b89b032d8cee6982272065b2bf325f8a811dff258264118a79496912377337ceb9ad630138b6bedb89e3c3be89a5f6a6fea85ab586b SHA512 94cdd0c3f0d8f535f3462c5adba266302f9b129abacda077ed429fa38af6862fca5a90ba2e606b78607b509769305cc6134c483c7033c20e226596cca2d42b90
27 DIST sleuthkit-4.5.0.tar.gz 8611141 BLAKE2B a1ae66bfcb74ce1fec24f80dfe60cd68f1de53119331c38848f7f82de8052eda49d78fdea49e42ada5843094939ef212dece42a5ceb85931a79e02adccda30e6 SHA512 911890cacca739f121681514197104cb2dc3bd219f3e068c4ce61264498c56989359976fc75172e1f456c94e4e25c6206413b0234c36e55736a577b8e664e4b3
28 @@ -7,6 +8,7 @@ DIST sleuthkit-4.6.6.tar.gz 8668433 BLAKE2B 49594dd329e7c67c473130659bbdab02d448
29 DIST sleuthkit-4.6.7.tar.gz 8672554 BLAKE2B def0bc3cd4c1ae1485efe683f581209b2c57bdcb1009bdd0b81cff284b6d3cb221a85ef12012a360bf2c07f84f12a6741ab2281cd0f51ecaff4685b84bf0ea1f SHA512 5b2000960a054fd947acb214532076a369d788914a8ff141c9a2d1b8a69e001c891b1e4b8dd40f94d96810a436e240e5a76e9f90ccab462888fad789c1181cc6
30 DIST sleuthkit-4.7.0.tar.gz 8715010 BLAKE2B cdbe4ff4d3a4f6606dec9fc7dc867c9186fc628cba02ea21240875b5da0b1c61c65f9d68b8059651026f06bfd2976bc10d3077cf765083ef97c631af85e27c62 SHA512 bd39101f89615485c17d72836689ee14cf1199c26f2a84a56c4a127d6ced1acf091ff8a4bd373acd970c8a88e3625edc3f6e7d028f292f74439590b11c15be80
31 DIST sleuthkit-4.8.0.tar.gz 10176958 BLAKE2B 65922a680e32effaedf669d076a242facbea98c6f53df841936bcd8b65a903309265c8a3e74bccd8e4d2694c8d10cb700079fc4499fcd82f02a27fedd38a446e SHA512 6dd225225c59013c128015f9b71b73bb82ba21887a695f8bc7325e1d11e2471d6e364077631b8d543c8c25ce9781470893f37998c38151347bb96d258f13ccc7
32 +DIST sleuthkit-4.9.0.tar.gz 3473764 BLAKE2B 3950e586595f53a81c845b3b1fbaf4939a84ee3d81e8141cabf41c9fbee1b1f5cf1b8bd6cab95b157d60364541736f750c8ada61c76da89e663721b9a67330ef SHA512 1db8b9f825aa551fe5bdf01285832b903fb4f2d6a8fd9a57a5cd5c9005dfdbec22d3dd49d394616d838e2a2111110018e787f2ed467a1c27a500fc75bed0dd0b
33 DIST sleuthkit-libewf_64bit-20130416.tar.gz 23818247 BLAKE2B 23be933ed8a74e4834ee6571a28d81ba16e98e4e4e27b5b1b3b655d1d92a6eadcba35aadf96aa404e6e0a225b27f3f5daff2836879b87fe58440a3ad5645de44 SHA512 611cbb57de17600caee0330bbe9917c4481d7711a35dba8c072fd49cd3e1714e0a3ce30fd8fcac9981db848e80870bf5d215326c56808bb6f5b4c8dcc1e5a3c9
34 DIST sqlite-jdbc-3.25.2.jar 7064881 BLAKE2B 3917da6127137bab710a9e61f326f59320ce94654ebb8ae5e694b05aed6b9b1bd367ade2f08ce5bb52c3ac296992240ad949969f5eff712615d07a18588c6a17 SHA512 efd1ea26d7f4f9bc66bf0d5f80234a0c535829bd498e4c5a0cab42873b58ac69133497d8c45689a1d3a39e657a2d0474d6b930c7bc415dd623801ee4a7354ffb
35 DIST sqlite-jdbc-3.8.11.jar 5131732 BLAKE2B 1a04fa9e9cb97fdddc19af2de9efa7b54c0b527642e6e325e31054e4e294e3bc6af00ea291087ed9dd26668d48dae356035fc85212c0eb81656550d552103ed0 SHA512 5f4705101992e8916e29742c560aef0d01eba9dc0d2d984b75a77e56be3c9fd20b284390fe8f9bb54bf9d1f8528c3413922684c446212ca8961ac731543fb179
36
37 diff --git a/app-forensics/sleuthkit/sleuthkit-4.9.0.ebuild b/app-forensics/sleuthkit/sleuthkit-4.9.0.ebuild
38 new file mode 100644
39 index 00000000000..fcc3132067e
40 --- /dev/null
41 +++ b/app-forensics/sleuthkit/sleuthkit-4.9.0.ebuild
42 @@ -0,0 +1,298 @@
43 +# Copyright 1999-2020 Gentoo Authors
44 +# Distributed under the terms of the GNU General Public License v2
45 +
46 +EAPI=6
47 +
48 +JAVA_PKG_BSFIX_NAME="build.xml build-unix.xml"
49 +inherit autotools java-pkg-opt-2 java-ant-2
50 +
51 +DESCRIPTION="A collection of file system and media management forensic analysis tools"
52 +HOMEPAGE="https://www.sleuthkit.org/sleuthkit/"
53 +# TODO: sqlite-jdbc does not exist in the tree, we bundle it for now
54 +# See: https://bugs.gentoo.org/690010
55 +# TODO: SparseBitSet does not exist in the tree, we bundle it for now
56 +# See: https://bugs.gentoo.org/690012
57 +# TODO: Upstream uses a very specific version of libewf which is not in
58 +# the tree anymore. So we statically compile and link to sleuthkit.
59 +# Hopefully upstream will figure something out in the future.
60 +# See: https://bugs.gentoo.org/689752
61 +# TODO: gson-2.8.5 does not exist in the tree. Building it seems to
62 +# require Java 9. We have Java 11 in the tree but I don't see a
63 +# way to use it as a gentoo-vm in order to build gson. Sleuthkit
64 +# upstream still uses Java 8.
65 +# See: https://bugs.gentoo.org/706274
66 +# TODO: commons-validator-1.6 does not exist in the tree. The latest version
67 +# as of writing this ebuild is 1.4.1, for which the build fails. As
68 +# per #711930, this is a security sensitive bump. We're gonna fetch
69 +# the jar file here and file a bug request for a bump as well:
70 +# https://bugs.gentoo.org/721020
71 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz
72 + java? (
73 + https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar
74 + http://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.25.2/sqlite-jdbc-3.25.2.jar
75 + http://repo1.maven.org/maven2/com/zaxxer/SparseBitSet/1.1/SparseBitSet-1.1.jar
76 + https://repo1.maven.org/maven2/commons-validator/commons-validator/1.6/commons-validator-1.6.jar
77 + )
78 + ewf? ( https://github.com/sleuthkit/libewf_64bit/archive/VisualStudio_2010.tar.gz -> sleuthkit-libewf_64bit-20130416.tar.gz )"
79 +
80 +LICENSE="BSD CPL-1.0 GPL-2+ IBM java? ( Apache-2.0 )"
81 +SLOT="0/13" # subslot = major soname version
82 +KEYWORDS="~amd64 ~hppa ~ppc ~x86"
83 +IUSE="aff doc ewf java postgres static-libs test +threads zlib"
84 +RESTRICT="!test? ( test )"
85 +
86 +#
87 +# Note: It is not possible to move the dep on dev-java/jdbc-postgresql
88 +# inside a conditional postgres? block because java sources import
89 +# org.postgres unconditionally as of writing this (version 4.6.4). The
90 +# postgres USE flag will be used for the TSK postgresql support however.
91 +#
92 +DEPEND="
93 + dev-db/sqlite:3
94 + dev-lang/perl:*
95 + aff? ( app-forensics/afflib )
96 + ewf? ( sys-libs/zlib )
97 + java? (
98 + >=dev-java/c3p0-0.9.5:0
99 + dev-java/commons-lang:3.1
100 + dev-java/guava:20
101 + >=dev-java/jdbc-postgresql-9.4:0
102 + >=dev-java/joda-time-2.4:0
103 + )
104 + postgres? ( dev-db/postgresql:= )
105 + zlib? ( sys-libs/zlib )
106 +"
107 +# TODO: add support for not-in-tree libraries libvhdi and libvmdk
108 +# libvhdi: https://github.com/libyal/libvhdi
109 +# libvmdk: https://github.com/libyal/libvmdk
110 +# DEPEND="${DEPEND}
111 +# vhdi? ( dev-libs/libvhdi )
112 +# vmdk? ( dev-libs/libvmdk )
113 +# "
114 +
115 +RDEPEND="${DEPEND}
116 + java? (
117 + || (
118 + virtual/jre:1.8
119 + virtual/jdk:1.8
120 + )
121 + )
122 +"
123 +DEPEND="${DEPEND}
124 + java? ( virtual/jdk:1.8 )
125 + doc? ( app-doc/doxygen )
126 + test? ( >=dev-util/cppunit-1.2.1 )
127 +"
128 +
129 +PATCHES=(
130 + "${FILESDIR}"/${PN}-4.1.0-tools-shared-libs.patch
131 + "${FILESDIR}"/${PN}-4.6.4-default-jar-location-fix.patch
132 +)
133 +
134 +src_unpack() {
135 + local f
136 +
137 + unpack ${P}.tar.gz
138 +
139 + if use ewf; then
140 + pushd "${T}" &>/dev/null || die
141 + unpack sleuthkit-libewf_64bit-20130416.tar.gz
142 + export TSK_LIBEWF_SRCDIR="${T}"/libewf_64bit-VisualStudio_2010
143 + popd &>/dev/null || die
144 + fi
145 +
146 + # Copy the jar files that don't exist in the tree yet
147 + if use java; then
148 + TSK_JAR_DIR="${T}/lib"
149 + mkdir "${TSK_JAR_DIR}" || die
150 + for f in ${A}; do
151 + if [[ ${f} =~ .jar$ ]]; then
152 + cp "${DISTDIR}"/"${f}" "${TSK_JAR_DIR}" || die
153 + fi
154 + done
155 + export TSK_JAR_DIR
156 + fi
157 +}
158 +
159 +tsk_prepare_libewf() {
160 + # Inlining breaks the compilation, disable it
161 + sed -e 's/LIBUNA_INLINE inline/LIBUNA_INLINE/' \
162 + -i "${TSK_LIBEWF_SRCDIR}"/libuna/libuna_inline.h || die
163 +}
164 +
165 +src_prepare() {
166 + use ewf && tsk_prepare_libewf
167 +
168 + if use java; then
169 + pushd "${S}"/bindings/java &>/dev/null || die
170 +
171 + # Prevent "make install" from installing
172 + # jar files under /usr/share/java
173 + # We'll use the java eclasses for this
174 + # See: https://github.com/sleuthkit/sleuthkit/pull/1379
175 + sed -e '/^jar_DATA/ d;' -i Makefile.am || die
176 +
177 + java-pkg-opt-2_src_prepare
178 +
179 + popd &>/dev/null || die
180 + fi
181 +
182 + # Override the doxygen output directories
183 + if use doc; then
184 + sed -e "/^OUTPUT_DIRECTORY/ s|=.*$|= ${T}/doc|" \
185 + -i tsk/docs/Doxyfile \
186 + -i bindings/java/doxygen/Doxyfile || die
187 + fi
188 +
189 + # It's safe to call this even after java-pkg-opt-2_src_prepare
190 + # because future calls to eapply_user do nothing and return 0
191 + default
192 +
193 + eautoreconf
194 +}
195 +
196 +tsk_compile_libewf() {
197 + local myeconfargs=(
198 + --prefix=/
199 + --libdir=/lib
200 + --enable-static
201 + --disable-shared
202 + --disable-winapi
203 + --without-libbfio
204 + --with-zlib
205 + --without-bzip2
206 + --without-libhmac
207 + --without-openssl
208 + --without-libuuid
209 + --without-libfuse
210 +
211 + --with-libcstring=no
212 + --with-libcerror=no
213 + --with-libcdata=no
214 + --with-libclocale=no
215 + --with-libcnotify=no
216 + --with-libcsplit=no
217 + --with-libuna=no
218 + --with-libcfile=no
219 + --with-libcpath=no
220 + --with-libbfio=no
221 + --with-libfcache=no
222 + --with-libfvalue=no
223 +
224 + )
225 + # We want to contain our build flags
226 + local CFLAGS="${CFLAGS}"
227 + local LDFLAGS="${LDFLAGS}"
228 +
229 + pushd "${TSK_LIBEWF_SRCDIR}" &>/dev/null || die
230 +
231 + # Produce relocatable code
232 + CFLAGS+=" -fPIC"
233 + LDFLAGS+=" -fPIC"
234 + econf "${myeconfargs[@]}"
235 +
236 + # Do not waste CPU cycles on building ewftools
237 + sed -e '/ewftools/ d' -i Makefile || die
238 + emake
239 +
240 + # Only install the headers and the library
241 + emake -C libewf DESTDIR="${T}"/image install
242 + emake -C include DESTDIR="${T}"/image install
243 + find "${T}"/image -name '*.la' -delete || die
244 +
245 + popd &>/dev/null || die
246 +}
247 +
248 +src_configure() {
249 + local myeconfargs=(
250 + --enable-offline="${TSK_JAR_DIR}"
251 + $(use_enable java)
252 + $(use_enable static-libs static)
253 + $(use_enable threads multithreading)
254 + $(use_with aff afflib)
255 + $(use_with zlib)
256 + )
257 + # Workaround the automagic detection of postgresql
258 + local -x ac_cv_lib_pq_PQlibVersion="$(usex postgres)"
259 + # TODO: add support for non-existing libraries libvhdi and libvmdk
260 + # myeconfargs+=(
261 + # $(use_with vhdi libvhdi)
262 + # $(use_with vmdk libvmdk)
263 + # )
264 + myeconfargs+=(
265 + --without-libvhdi
266 + --without-libvmdk
267 + )
268 +
269 + use ewf && tsk_compile_libewf
270 + myeconfargs+=( $(use_with ewf libewf "${T}"/image) )
271 +
272 + if use java; then
273 + pushd "${S}"/bindings/java &>/dev/null || die
274 + java-ant-2_src_configure
275 + popd &>/dev/null || die
276 + fi
277 +
278 + econf "${myeconfargs[@]}"
279 +}
280 +
281 +src_compile() {
282 + # Give it an existing bogus ivy home #672220
283 + local -x IVY_HOME="${T}"
284 +
285 + # Create symlinks of jars for the required dependencies
286 + if use java; then
287 + pushd "${S}"/bindings/java &>/dev/null || die
288 +
289 + java-pkg_jar-from --into "${TSK_JAR_DIR}" c3p0
290 + java-pkg_jar-from --into "${TSK_JAR_DIR}" commons-lang:3.1
291 + java-pkg_jar-from --into "${TSK_JAR_DIR}" guava:20
292 + java-pkg_jar-from --into "${TSK_JAR_DIR}" jdbc-postgresql
293 + java-pkg_jar-from --into "${TSK_JAR_DIR}" joda-time
294 +
295 + popd &>/dev/null || die
296 + fi
297 +
298 + # Create the doc output dirs if requested
299 + if use doc; then
300 + mkdir -p "${T}"/doc/{api-docs,jni-docs} || die
301 + fi
302 +
303 + emake all $(usex doc api-docs "")
304 +}
305 +
306 +src_install() {
307 + local f
308 +
309 + if use java; then
310 + pushd "${S}"/bindings/java &>/dev/null || die
311 +
312 + java-pkg_newjar "dist/${P}.jar" "${PN}.jar"
313 +
314 + # Install the bundled jar files
315 + pushd "${TSK_JAR_DIR}" &>/dev/null || die
316 + for f in *; do
317 + # Skip the symlinks java-pkg_jar-from created
318 + [[ -f ${f} ]] || continue
319 +
320 + # Strip the version numbers as per eclass recommendation
321 + [[ ${f} =~ -([0-9]+\.)+jar$ ]] || continue
322 +
323 + java-pkg_newjar "${f}" "${f/${BASH_REMATCH[0]}/.jar}"
324 + done
325 + popd &>/dev/null || die
326 +
327 + popd &>/dev/null || die
328 + fi
329 +
330 + default
331 +
332 + # It unconditionally builds both api and jni docs
333 + # We install conditionally based on the provided use flags
334 + if use doc; then
335 + dodoc -r "${T}"/doc/api-docs
336 + use java && dodoc -r "${T}"/doc/jni-docs
337 + fi
338 +
339 + find "${D}" -name '*.la' -delete || die
340 +}