- Add fix-rename-bool-variable.patch gcc 15 support

- update to v0~20250729
	* Pre-release of version 20250729, for testing purposes, based on libtsk 4.14.0

OBS-URL: https://build.opensuse.org/package/show/security:forensics/python-tsk?expand=0&rev=19
This commit is contained in:
2025-08-04 15:54:56 +00:00
committed by Git OBS Bridge
commit 88d5132413
7 changed files with 278 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,79 @@
Index: pytsk3-20250729/talloc/replace.h
===================================================================
--- pytsk3-20250729.orig/talloc/replace.h
+++ pytsk3-20250729/talloc/replace.h
@@ -11,7 +11,7 @@
#define _PUBLIC_ extern
-typedef int bool;
+typedef int talloc_bool;
#define true 1
#define false 0
Index: pytsk3-20250729/talloc/talloc.c
===================================================================
--- pytsk3-20250729.orig/talloc/talloc.c
+++ pytsk3-20250729/talloc/talloc.c
@@ -120,8 +120,8 @@ static void *autofree_context;
* catching use after free errors when valgrind is too slow
*/
static struct {
- bool initialised;
- bool enabled;
+ talloc_bool initialised;
+ talloc_bool enabled;
uint8_t fill_value;
} talloc_fill;
@@ -237,7 +237,7 @@ struct talloc_memlimit {
size_t cur_size;
};
-static bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size);
+static talloc_bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size);
static void talloc_memlimit_grow(struct talloc_memlimit *limit,
size_t size);
static void talloc_memlimit_shrink(struct talloc_memlimit *limit,
@@ -1582,7 +1582,7 @@ _PUBLIC_ void *_talloc_realloc(const voi
{
struct talloc_chunk *tc;
void *new_ptr;
- bool malloced = false;
+ talloc_bool malloced = false;
struct talloc_pool_hdr *pool_hdr = NULL;
size_t old_size = 0;
size_t new_size = 0;
@@ -2672,7 +2672,7 @@ static size_t _talloc_total_limit_size(c
old_limit, new_limit);
}
-static bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size)
+static talloc_bool talloc_memlimit_check(struct talloc_memlimit *limit, size_t size)
{
struct talloc_memlimit *l;
Index: pytsk3-20250729/sleuthkit/tsk/base/crc.h
===================================================================
--- pytsk3-20250729.orig/sleuthkit/tsk/base/crc.h
+++ pytsk3-20250729/sleuthkit/tsk/base/crc.h
@@ -91,7 +91,7 @@ Status : Copyright (C) Ross Williams, 1
#ifndef DONE_STYLE
typedef unsigned long ulong;
-typedef unsigned bool;
+typedef unsigned crc_bool;
typedef unsigned char * p_ubyte_;
#ifndef TRUE
@@ -120,8 +120,8 @@ typedef struct
int cm_width; /* Parameter: Width in bits [8,32]. */
ulong cm_poly; /* Parameter: The algorithm's polynomial. */
ulong cm_init; /* Parameter: Initial register value. */
- bool cm_refin; /* Parameter: Reflect input bytes? */
- bool cm_refot; /* Parameter: Reflect output CRC? */
+ crc_bool cm_refin; /* Parameter: Reflect input bytes? */
+ crc_bool cm_refot; /* Parameter: Reflect output CRC? */
ulong cm_xorot; /* Parameter: XOR this to output CRC. */
ulong cm_reg; /* Context: Context during execution. */

91
python-tsk.changes Normal file
View File

@@ -0,0 +1,91 @@
-------------------------------------------------------------------
Fri Aug 1 14:49:21 UTC 2025 - Felix Stegmeier <felix.stegmeier@suse.com>
- Add fix-rename-bool-variable.patch gcc 15 support
- update to v0~20250729
* Pre-release of version 20250729, for testing purposes, based on libtsk 4.14.0
-------------------------------------------------------------------
Tue Aug 1 18:49:10 UTC 2023 - Greg Freemyer <Greg.Freemyer@gmail.com>
- use %{?sle15_python_module_pythons} for opensuse15.5 compatibility
-------------------------------------------------------------------
Mon May 23 22:13:40 UTC 2022 - Greg Freemyer <Greg.Freemyer@gmail.com>
- update to v0~20210419
* Updated to be compatible with Sleuthkit 4.10.2
-------------------------------------------------------------------
Mon Jan 20 00:42:19 UTC 2020 - Greg Freemyer <Greg.Freemyer@gmail.com>
- update to v0~20200117
* Python 2 is officially NOT supported, drop python 2
* Updated to Sleuthkit 4.7.0
- add a %check section
- add
* BuildRequires: pkgconfig(libvhdi)
* BuildRequires: pkgconfig(libvmdk)
- remove unused patch file pytsk_20170128_remove_talloc_build.patch
-------------------------------------------------------------------
Tue Oct 3 23:20:10 UTC 2017 - Greg.Freemyer@gmail.com
- update to v0~20170802
- implement python singlespec syntax
- add LGPL-3.0+ for the included talloc library
-------------------------------------------------------------------
Sat Feb 25 20:05:57 UTC 2017 - Greg.Freemyer@gmail.com
- update to v0~20170128
* Syncs up with recent Sleuthkit versions
* required by python-plaso 1.5.1 support of Sleuthkit 4.4.0
* fails to build with Leap 42.1 and older
* the only known consumer of python-tsk v0~20170128 is python-plaso v1.5.1
* both python-tsk v0~20170128 and python-plaso v1.5.1 will only be supported on Leap 42.2 and newer
- add a patch to keep setup.py from attempting to build internal talloc lib
- prepare to add python3 support
- add Provides pytsk3 as used by python-plaso 1.5.1
-------------------------------------------------------------------
Fri Aug 15 23:05:21 UTC 2014 - Greg.Freemyer@gmail.com
- add "Provides: pytsk" - pytsk is now in use by upstream dependencies
-------------------------------------------------------------------
Wed Aug 13 22:07:23 UTC 2014 - Greg.Freemyer@gmail.com
- update to v0~20140506
* This is just a wrapper for libtsk10, upstream did not provide any release notes
-------------------------------------------------------------------
Wed Sep 11 02:57:48 UTC 2013 - Greg.Freemyer@gmail.com
- Address legal issues raised in BNC#839248
- update to latest version in source repo (as of 9/10/2013)
* now uses libtalloc shared library if available
* remaining GPL licenses changed to Apache-2.0 with permission of relevant copyright holder
- added BuildRequires libtalloc-devel to allow shared library to be used
- added rm -rf talloc and talloc.new to highlight they are not used in the build
-------------------------------------------------------------------
Thu Aug 22 12:59:47 UTC 2013 - Greg.Freemyer@gmail.com
- fix BuildRequires
* remove spurious pcre-devel
* add gcc-c++
-------------------------------------------------------------------
Sat Aug 17 04:47:01 UTC 2013 - Greg.Freemyer@gmail.com
- update to latest version in source repo
- per author, sleuthkit-devel 4.1 compatibility is only in the source repo
- change version from 0.0.0~ to 0~
-------------------------------------------------------------------
Wed Mar 27 17:47:31 UTC 2013 - Greg.Freemyer@gmail.com
- initial package

78
python-tsk.spec Normal file
View File

@@ -0,0 +1,78 @@
#
# spec file for package python-tsk
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
%define timestamp 20250729
Name: python-tsk
Version: 0~%{timestamp}
Release: 0
Summary: Python bindings for tsk - The SleuthKit
# the included talloc library is LGPL 3
License: Apache-2.0 AND LGPL-3.0-or-later
URL: https://github.com/py4n6/pytsk/
Source0: https://files.pythonhosted.org/packages/source/p/pytsk3/pytsk3-%{timestamp}.tar.gz
#PATCH-FIX-UPSTREAM fix-rename-bool-variable.patch taken from https://github.com/py4n6/pytsk/pull/111/
Patch0: fix-rename-bool-variable.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libstdc++-devel
BuildRequires: libtalloc-devel
BuildRequires: postgresql-devel
BuildRequires: python-rpm-macros
BuildRequires: sleuthkit-devel >= 4.10.2
BuildRequires: zlib-devel
BuildRequires: pkgconfig(libvhdi)
BuildRequires: pkgconfig(libvmdk)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
The Sleuthkit is a forensic filesystem analysis framework (http://www.sleuthkit.org/). This project is a python 3 binding for the sleuthkit.
%prep
%autosetup -p1 -n pytsk3-%{timestamp}
# remove unused libraries with incompatible license, use libtalloc from main repositories
# rm -rf pytsk talloc
# rm -rf pytsk talloc.new
%build
CFLAGS="%{optflags}"
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# pytest is NOT suppoerted (see gh#py4n6/pytsk#48)
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python ./run_tests.py
}
%files %{python_files}
%defattr(-,root,root)
%doc README
%license LICENSE
%{python_sitearch}/*
%changelog

3
pytsk3-20210419.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:492d833924409fef89b802434d13f404b0121a5247cfe71d2068723a25079035
size 3187790

3
pytsk3-20250729.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7e41fb4d43f79b81e135dea15c5bc18649eaf8cda04bfba13e8ba7c1de6ee05a
size 3327242