[packages/sleuthkit] - up to 4.9.0 - fix building with current libewf

baggins baggins at pld-linux.org
Mon Jun 1 10:10:44 CEST 2020


commit af6698e7b9c93c30dcc7ee5cdfd1f6c8fa6f2796
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Jun 1 10:10:18 2020 +0200

    - up to 4.9.0
    - fix building with current libewf

 libewf.patch   | 26 ++++++++++++++++++++++++++
 sleuthkit.spec | 18 +++++++++++++-----
 2 files changed, 39 insertions(+), 5 deletions(-)
---
diff --git a/sleuthkit.spec b/sleuthkit.spec
index f4655b0..de3bf8c 100644
--- a/sleuthkit.spec
+++ b/sleuthkit.spec
@@ -9,12 +9,13 @@
 Summary:	The Sleuth Kit - an forensic toolkit for analyzing file systems and disks
 Summary(pl.UTF-8):	The Sleuth Kit - zestaw narzędzi wspomagających analizę systemów plików
 Name:		sleuthkit
-Version:	4.6.7
+Version:	4.9.0
 Release:	1
 License:	IBM Public License/Common Public License
 Group:		Applications
 Source0:	https://github.com/sleuthkit/sleuthkit/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	173216be56d73c89a04631607068af80
+# Source0-md5:	01f04162de36cd23038a9d8f75b1c48a
+Patch0:		libewf.patch
 URL:		http://www.sleuthkit.org/sleuthkit/
 %{?with_aff:BuildRequires:	afflib-devel}
 #BuildRequires:	autoconf
@@ -129,13 +130,20 @@ Dowiązania Javy do sleuthkit.
 
 %prep
 %setup -q
-sed -i -e 's/-static//' {samples,tests,tools/*tools}/Makefile.in
+%patch0 -p1
+
+%{__sed} -i -e 's/-static//' {samples,tests,tools/*tools}/Makefile.in
 
 %build
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
 	%{!?with_aff:--without-afflib}
 
-sed -i -e 's/^\(LIBS = -lewf\)/\1 -ldl -lpthread/' {tools/autotools,tsk}/Makefile
+%{__sed} -i -e 's/^\(LIBS = -lewf\)/\1 -ldl -lpthread/' {tools/autotools,tsk}/Makefile
+
 %{__make}
 
 %install
@@ -158,7 +166,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libtsk.so.*.*.*
 %attr(755,root,root) %{_libdir}/libtsk_jni.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libtsk.so.13
+%attr(755,root,root) %ghost %{_libdir}/libtsk.so.19
 %attr(755,root,root) %ghost %{_libdir}/libtsk_jni.so.0
 
 %files devel
diff --git a/libewf.patch b/libewf.patch
new file mode 100644
index 0000000..279d97a
--- /dev/null
+++ b/libewf.patch
@@ -0,0 +1,26 @@
+--- sleuthkit-4.6.7/tsk/img/ewf.cpp~	2020-05-01 04:05:39.000000000 +0200
++++ sleuthkit-4.6.7/tsk/img/ewf.cpp	2020-06-01 09:29:02.700329814 +0200
+@@ -67,8 +67,13 @@
+ 
+     tsk_take_lock(&(ewf_info->read_lock));
+ #if defined( HAVE_LIBEWF_V2_API )
++#if defined( HAVE_LIBEWF_HANDLE_READ_BUFFER_AT_OFFSET )
++    cnt = libewf_handle_read_buffer_at_offset(ewf_info->handle,
++        buf, len, offset, &ewf_error);
++#else
+     cnt = libewf_handle_read_random(ewf_info->handle,
+         buf, len, offset, &ewf_error);
++#endif
+     if (cnt < 0) {
+         char *errmsg = NULL;
+         tsk_error_reset();
+--- sleuthkit-4.6.7/configure.ac~	2020-06-01 09:35:55.000000000 +0200
++++ sleuthkit-4.6.7/configure.ac	2020-06-01 09:38:05.671729514 +0200
+@@ -252,6 +250,7 @@
+     [AC_CHECK_HEADERS([libewf.h],
+       [AC_CHECK_LIB([ewf], [libewf_get_version], [], [NO_LIBEWF=true])]
+     )]
++    AC_CHECK_FUNCS([libewf_handle_read_buffer_at_offset libewf_handle_write_buffer_at_offset])
+ )
+ AS_IF([test "x$ac_cv_lib_ewf_libewf_get_version" = "xyes"], [ax_libewf=yes], [ax_libewf=no])
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sleuthkit.git/commitdiff/af6698e7b9c93c30dcc7ee5cdfd1f6c8fa6f2796



More information about the pld-cvs-commit mailing list