From 881274ea10988c2b6a678d3d70472a1defc5bed2df8328f5dcc2793da9e34dba Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 4 Aug 2025 15:54:56 +0000 Subject: [PATCH] Accepting request 1297474 from home:fstegmeier:branches:security:forensics - 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/request/show/1297474 OBS-URL: https://build.opensuse.org/package/show/security:forensics/python-tsk?expand=0&rev=19 --- fix-rename-bool-variable.patch | 79 ++++++++++++++++++++++++++++++++++ python-tsk.changes | 8 ++++ python-tsk.spec | 9 ++-- pytsk3-20210419.tar.gz | 3 -- pytsk3-20250729.tar.gz | 3 ++ 5 files changed, 96 insertions(+), 6 deletions(-) create mode 100644 fix-rename-bool-variable.patch delete mode 100644 pytsk3-20210419.tar.gz create mode 100644 pytsk3-20250729.tar.gz diff --git a/fix-rename-bool-variable.patch b/fix-rename-bool-variable.patch new file mode 100644 index 0000000..e127e47 --- /dev/null +++ b/fix-rename-bool-variable.patch @@ -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. */ diff --git a/python-tsk.changes b/python-tsk.changes index ec4a30d..860b9f1 100644 --- a/python-tsk.changes +++ b/python-tsk.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Aug 1 14:49:21 UTC 2025 - Felix Stegmeier + +- 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 diff --git a/python-tsk.spec b/python-tsk.spec index c40673d..290e2f3 100644 --- a/python-tsk.spec +++ b/python-tsk.spec @@ -1,7 +1,7 @@ # # spec file for package python-tsk # -# Copyright (c) 2022 SUSE LLC +# 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 @@ -15,9 +15,10 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %{?sle15_python_module_pythons} -%define timestamp 20210419 +%define timestamp 20250729 Name: python-tsk Version: 0~%{timestamp} @@ -27,6 +28,8 @@ Summary: Python bindings for tsk - The SleuthKit 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 @@ -47,7 +50,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build The Sleuthkit is a forensic filesystem analysis framework (http://www.sleuthkit.org/). This project is a python 3 binding for the sleuthkit. %prep -%setup -q -n pytsk3-%{timestamp} +%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 diff --git a/pytsk3-20210419.tar.gz b/pytsk3-20210419.tar.gz deleted file mode 100644 index 773118c..0000000 --- a/pytsk3-20210419.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:492d833924409fef89b802434d13f404b0121a5247cfe71d2068723a25079035 -size 3187790 diff --git a/pytsk3-20250729.tar.gz b/pytsk3-20250729.tar.gz new file mode 100644 index 0000000..9784593 --- /dev/null +++ b/pytsk3-20250729.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e41fb4d43f79b81e135dea15c5bc18649eaf8cda04bfba13e8ba7c1de6ee05a +size 3327242