[packages/sleuthkit] - updated to 4.12.0 - added patch with missing files from git

qboosh qboosh at pld-linux.org
Sun Jun 18 19:09:27 CEST 2023


commit 4c30c1bb937ec54e59b2821a562ae144d7254616
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jun 18 18:47:23 2023 +0200

    - updated to 4.12.0
    - added patch with missing files from git

 libewf.patch            |  22 ++++----
 sleuthkit-missing.patch | 147 ++++++++++++++++++++++++++++++++++++++++++++++++
 sleuthkit.spec          |  50 +++++++++-------
 3 files changed, 190 insertions(+), 29 deletions(-)
---
diff --git a/sleuthkit.spec b/sleuthkit.spec
index 6aa868f..b12eff6 100644
--- a/sleuthkit.spec
+++ b/sleuthkit.spec
@@ -1,8 +1,4 @@
 #
-# TODO:
-#	- add libvhdi bcond and support
-#	- add libvmdk bcond and support
-#
 # Conditional build:
 %bcond_without	aff		# Without Advanced Forensic Format (aff) support
 %bcond_with	java		# Build Java bindings and jar file
@@ -10,23 +6,30 @@
 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.10.1
+Version:	4.12.0
 Release:	1
 License:	IBM Public License/Common Public License
-Group:		Applications
+Group:		Applications/File
+#Source0Download: https://github.com/sleuthkit/sleuthkit/releases
 Source0:	https://github.com/sleuthkit/sleuthkit/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	c37bb35897a471c52ec18e0cbb807e9e
+# Source0-md5:	4beb0e6d3f303642a160e816914c5690
 Patch0:		libewf.patch
+Patch1:		%{name}-missing.patch
 URL:		http://www.sleuthkit.org/sleuthkit/
 %{?with_aff:BuildRequires:	afflib-devel}
 BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake
 BuildRequires:	cppunit-devel >= 1.12.1
+BuildRequires:	libbfio-devel
 BuildRequires:	libewf-devel
 BuildRequires:	libstdc++-devel >= 6:5
 BuildRequires:	libtool
+BuildRequires:	libvhdi-devel
+BuildRequires:	libvmdk-devel
+BuildRequires:	libvslvm-devel
 #BuildRequires:	openssl-devel
 BuildRequires:	perl-base
+BuildRequires:	pkgconfig
 BuildRequires:	sed >= 4.0
 BuildRequires:	sqlite3-devel >= 3
 BuildRequires:	zlib-devel
@@ -83,33 +86,36 @@ Sleuthkit shared library.
 Biblioteka współdzielona Sleuthkita.
 
 %package devel
-Summary:	Header files for %{name} library
-Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki %{name}
+Summary:	Header files for TheSleuthKit library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki TheSleuthKit
 Group:		Development/Libraries
 Requires:	%{name}-libs = %{version}-%{release}
 %{?with_aff:Requires:	afflib-devel}
 Requires:	libewf-devel
 Requires:	libstdc++-devel >= 6:5
+Requires:	libvhdi-devel
+Requires:	libvmdk-devel
+Requires:	libvslvm-devel
 Requires:	sqlite3-devel >= 3
 Requires:	zlib-devel
 
 %description devel
-Header files for %{name} library.
+Header files for TheSleuthKit library.
 
 %description devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki %{name}.
+Pliki nagłówkowe biblioteki TheSleuthKit.
 
 %package static
-Summary:	Static %{name} library
-Summary(pl.UTF-8):	Statyczna biblioteka %{name}
+Summary:	Static TheSleuthKit library
+Summary(pl.UTF-8):	Statyczna biblioteka TheSleuthKit
 Group:		Development/Libraries
 Requires:	%{name}-devel = %{version}-%{release}
 
 %description static
-Static %{name} library.
+Static TheSleuthKit library.
 
 %description static -l pl.UTF-8
-Statyczna biblioteka %{name}.
+Statyczna biblioteka TheSleuthKit.
 
 %package java
 Summary:	Java bindings for sleuthkit
@@ -126,9 +132,12 @@ Dowiązania Javy do sleuthkit.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %{__sed} -i -e 's/-static//' {samples,tests,tools/*tools}/Makefile.in
 
+%{__mv} licenses/{README.md,README_licenses.md}
+
 %build
 %{__libtoolize}
 %{__aclocal} -I m4
@@ -147,7 +156,10 @@ Dowiązania Javy do sleuthkit.
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-     DESTDIR=$RPM_BUILD_ROOT
+	DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libtsk*.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -157,7 +169,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc API-CHANGES.txt ChangeLog.txt NEWS.txt README.md licenses/*
+%doc API-CHANGES.txt ChangeLog.txt NEWS.txt README.md licenses/{IBM-LICENSE,README_licenses.md,bsd.txt,cpl1.0.txt,mit.txt}
 %attr(755,root,root) %{_bindir}/blkcalc
 %attr(755,root,root) %{_bindir}/blkcat
 %attr(755,root,root) %{_bindir}/blkls
@@ -187,6 +199,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/srch_strings
 %attr(755,root,root) %{_bindir}/tsk_comparedir
 %attr(755,root,root) %{_bindir}/tsk_gettimes
+%attr(755,root,root) %{_bindir}/tsk_imageinfo
 %attr(755,root,root) %{_bindir}/tsk_loaddb
 %attr(755,root,root) %{_bindir}/tsk_recover
 %attr(755,root,root) %{_bindir}/usnjls
@@ -232,12 +245,11 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libtsk.so
-%{_libdir}/libtsk.la
 %if %{with java}
 %attr(755,root,root) %{_libdir}/libtsk_jni.so
-%{_libdir}/libtsk_jni.la
 %endif
 %{_includedir}/tsk
+%{_pkgconfigdir}/tsk.pc
 
 %files static
 %defattr(644,root,root,755)
diff --git a/libewf.patch b/libewf.patch
index 279d97a..46169bb 100644
--- a/libewf.patch
+++ b/libewf.patch
@@ -14,13 +14,15 @@
      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])
- 
+--- sleuthkit-4.12.0/configure.ac.orig	2023-06-18 10:11:54.933025146 +0200
++++ sleuthkit-4.12.0/configure.ac	2023-06-18 11:50:09.761090122 +0200
+@@ -164,6 +164,9 @@ dnl Check if we should link with libbfio
+ TSK_OPT_DEP_CHECK([libbfio], [], [libbfio], [libbfio.h], [bfio], [libbfio_get_version])
+ dnl Check if we should link with libewf
+ TSK_OPT_DEP_CHECK([libewf], [EWF], [libewf], [libewf.h], [ewf], [libewf_get_version])
++AS_IF([test "x$ax_libewf" = "xyes"],
++      [AC_CHECK_LIB([ewf], [libewf_handle_read_buffer_at_offset], [AC_DEFINE([HAVE_LIBEWF_HANDLE_READ_BUFFER_AT_OFFSET], [1], [Have libewf_handle_read_buffer_at_offset function])])]
++)
+ dnl Check if we should link with libvhdi
+ TSK_OPT_DEP_CHECK([libvhdi], [VHDI], [libvhdi], [libvhdi.h], [vhdi], [libvhdi_get_version])
+ dnl Check if we should link with libvmdk
diff --git a/sleuthkit-missing.patch b/sleuthkit-missing.patch
new file mode 100644
index 0000000..37b9618
--- /dev/null
+++ b/sleuthkit-missing.patch
@@ -0,0 +1,147 @@
+--- sleuthkit-4.12.0/tsk/pool/tsk_lvm.hpp.orig	1970-01-01 01:00:00.000000000 +0100
++++ sleuthkit-4.12.0/tsk/pool/tsk_lvm.hpp	2023-06-18 13:52:11.678090561 +0200
+@@ -0,0 +1,51 @@
++/*
++ * The Sleuth Kit - Add on for Linux LVM support
++ *
++ * Copyright (c) 2022 Joachim Metz <joachim.metz at gmail.com>
++ *
++ * This software is distributed under the Common Public License 1.0
++ */
++
++#pragma once
++
++#include "tsk/base/tsk_base_i.h"
++
++#if HAVE_LIBVSLVM
++
++#include "tsk_pool.hpp"
++
++#include <libbfio.h>
++#include <libvslvm.h>
++
++class LVMPool;
++
++class LVMPool : public TSKPool {
++ protected:
++  TSK_IMG_INFO *_img;
++  // Start of the pool data within the image
++  TSK_OFF_T _offset;
++  libbfio_pool_t *_file_io_pool = NULL;
++  libvslvm_handle_t *_lvm_handle = NULL;
++  libvslvm_volume_group_t *_lvm_volume_group = NULL;
++
++ public:
++  LVMPool(std::vector<img_t> &&imgs);
++
++  // Moveable
++  LVMPool(LVMPool &&) = default;
++  LVMPool &operator=(LVMPool &&) = default;
++
++  // Not copyable because of TSK_IMG_INFO pointer
++  LVMPool(const LVMPool &) = delete;
++  LVMPool &operator=(const LVMPool &) = delete;
++
++  ~LVMPool();
++
++  std::string identifier;
++
++  ssize_t read(uint64_t address, char *buf, size_t buf_size) const
++      noexcept final;
++};
++
++#endif /* HAVE_LIBVSLVM */
++
+--- sleuthkit-4.12.0/tsk/pool/img_bfio_handle.h.orig	1970-01-01 01:00:00.000000000 +0100
++++ sleuthkit-4.12.0/tsk/pool/img_bfio_handle.h	2023-06-18 17:01:32.999874331 +0200
+@@ -0,0 +1,90 @@
++/*
++ * The Sleuth Kit - Image BFIO handle
++ *
++ * Copyright (c) 2022 Joachim Metz <joachim.metz at gmail.com>
++ *
++ * This software is distributed under the Common Public License 1.0
++ */
++
++#if !defined( _IMG_BFIO_HANDLE_H )
++#define _IMG_BFIO_HANDLE_H
++
++#include "tsk/base/tsk_base_i.h"
++
++#ifdef HAVE_LIBBFIO
++
++#include <libbfio.h>
++
++#include "tsk/img/tsk_img.h"
++
++#if defined( __cplusplus )
++extern "C" {
++#endif
++
++typedef struct img_bfio_handle img_bfio_handle_t;
++
++struct img_bfio_handle
++{
++	TSK_IMG_INFO *image;
++	TSK_OFF_T base_offset;
++	TSK_OFF_T logical_offset;
++	int access_flags;
++};
++
++int img_bfio_handle_initialize(
++     libbfio_handle_t **handle,
++     TSK_IMG_INFO *image,
++     TSK_OFF_T offset,
++     libbfio_error_t **error );
++
++int img_bfio_handle_free(
++     img_bfio_handle_t **img_bfio_handle,
++     libbfio_error_t **error );
++
++int img_bfio_handle_clone(
++     img_bfio_handle_t **destination_img_bfio_handle,
++     img_bfio_handle_t *source_img_bfio_handle,
++     libbfio_error_t **error );
++
++int img_bfio_handle_open(
++     img_bfio_handle_t *img_bfio_handle,
++     int access_flags,
++     libbfio_error_t **error );
++
++int img_bfio_handle_close(
++     img_bfio_handle_t *img_bfio_handle,
++     libbfio_error_t **error );
++
++ssize_t img_bfio_handle_read(
++         img_bfio_handle_t *img_bfio_handle,
++         uint8_t *buffer,
++         size_t size,
++         libbfio_error_t **error );
++
++off64_t img_bfio_handle_seek_offset(
++         img_bfio_handle_t *img_bfio_handle,
++         off64_t offset,
++         int whence,
++         libbfio_error_t **error );
++
++int img_bfio_handle_exists(
++     img_bfio_handle_t *img_bfio_handle,
++     libbfio_error_t **error );
++
++int img_bfio_handle_is_open(
++     img_bfio_handle_t *img_bfio_handle,
++     libbfio_error_t **error );
++
++int img_bfio_handle_get_size(
++     img_bfio_handle_t *img_bfio_handle,
++     size64_t *size,
++     libbfio_error_t **error );
++
++#if defined( __cplusplus )
++}
++#endif
++
++#endif /* HAVE_LIBBFIO */
++
++#endif /* !defined( _IMG_BFIO_HANDLE_H ) */
++
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list