Download raw body.
UPDATE sysutils/py-tsk and take MAINTANER
Hi Stuart,
On Wed, Feb 11, 2026 at 9:29 PM Stuart Henderson <stu@spacehopper.org>
wrote:
> On 2026/02/11 20:20, Sebastian Reitenbach wrote:
> > Hi,
> >
> > this updates py-tsk to latest, and while there take MAINTAINER.
> > Tidy Makefile a bit, and instead of patching setup.py and pre-configure
> dance,
> > add sleuthkit:path to BUILD_DEPS ...
> >
> > with tests downloaded from git repo, they all pass.
> >
> > comments, etc. or even OK welcome.
> >
> > cheers,
> > Sebastian
>
> If you build the old version, you'll see that with those patches it
> didn't build the bundled version of sleuthkit.
> it does build the bundled copy.
>
> With your change, it installs sleuthkit as a library dependency,
> then extracts/patches sleuthkit in WRKDIR and symlinks it into
> WRKSRC/sleuthkit/sleuthkit-$VERSION, then totally ignores that copy
> and the library dependency and goes on to build the bundled version.
> This is not optimal.
>
> Diff below is a cleaner way to build with the bundled lib (at least
> it doesn't pretend that it's using the ports one) also fixes running
> tests the normal ports way (the comment was wrong, test_data is
> there, but it misses some *.py files).
>
> I think it might be better to bring back the patch and fix things so
> that it builds against ports sleuthkit rather than the bundled one,
> but I didn't see how to do that.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/py-tsk/Makefile,v
> diff -u -p -r1.24 Makefile
> --- Makefile 8 Feb 2026 12:22:41 -0000 1.24
> +++ Makefile 11 Feb 2026 20:24:25 -0000
> @@ -1,39 +1,38 @@
> COMMENT = Python bindings for The Sleuth Kit (libtsk)
>
> -MODPY_DISTV = 20200117
> +MODPY_DISTV = 20250801
> DISTNAME = pytsk3-${MODPY_DISTV}
> PKGNAME = py-tsk-${MODPY_DISTV}
> -REVISION = 11
> +
> +# download a copy from github archive as well, to fill in the incomplete
> +# tests dir from the pypi sdist (this is simpler than fetching the whole
> +# port from github as it needs a submodule + autoconf scripts generating)
> +DIST_TUPLE = github py4n6 pytsk ${MODPY_DISTV} .
>
> CATEGORIES = sysutils
>
> HOMEPAGE = https://github.com/py4n6/pytsk/
> +MAINTAINER = Sebastian Reitenbach <sebastia@openbsd.org>
>
> # Apache v2
> PERMIT_PACKAGE = Yes
>
> -MODULES = lang/python
> -# so that we get gawk poisoning in the sleuthkit part
> -MODULES += gnu
> -
> -MODPY_PI = Yes
> -MODPY_PYBUILD = setuptools
> -
> -WANTLIB += talloc tsk ${MODPY_WANTLIB}
> +WANTLIB += ${COMPILER_LIBCXX} m
>
> # C++11
> -COMPILER= base-clang ports-gcc
> +COMPILER = base-clang ports-gcc
> +
> +MODULES = lang/python
> +MODPY_PYBUILD = setuptools
> +MODPY_PI = Yes
>
> -pre-configure:
> - ${SUBST_DATA} ${WRKSRC}/setup.py ${WRKSRC}/setup.py.new
> - mv ${WRKSRC}/setup.py.new ${WRKSRC}/setup.py
> +# so that we get gawk poisoning in the sleuthkit part
> +MODULES += gnu
>
> -LIB_DEPENDS = sysutils/sleuthkit \
> - devel/libtalloc
> -TEST_DEPENDS = sysutils/py-tsk=${MODPY_DISTV}
> +post-extract:
> + mv ${WRKDIR}/pytsk-${MODPY_DISTV}/tests/* ${WRKSRC}/tests/
>
> -# it needs test_data/* in the Github repository
> do-test:
> - cd ${WRKSRC} && ${MODPY_BIN} run_tests.py
> + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${MODPY_BIN} run_tests.py
>
> .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/sysutils/py-tsk/distinfo,v
> diff -u -p -r1.7 distinfo
> --- distinfo 17 Mar 2020 20:42:46 -0000 1.7
> +++ distinfo 11 Feb 2026 20:24:25 -0000
> @@ -1,2 +1,4 @@
> -SHA256 (pytsk3-20200117.tar.gz) =
> VhdxZKNY6YuqJYKWqi6aUJME3I2rBTq6w0dDWgl42WI=
> -SIZE (pytsk3-20200117.tar.gz) = 3060827
> +SHA256 (py4n6-pytsk-20250801.tar.gz) =
> EnI+QkAoSxOpChb1EXgxmynM+Gp1NTstKfXjmKsuT9o=
> +SHA256 (pytsk3-20250801.tar.gz) =
> asypmY1GEMRv231jeULcNU3KWLIn2M7jZi7Jm0qKor0=
> +SIZE (py4n6-pytsk-20250801.tar.gz) = 100734
> +SIZE (pytsk3-20250801.tar.gz) = 3327891
> Index: patches/patch-setup_py
> ===================================================================
> RCS file: patches/patch-setup_py
> diff -N patches/patch-setup_py
> --- patches/patch-setup_py 11 Mar 2022 19:57:54 -0000 1.3
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,39 +0,0 @@
> -Index: setup.py
> ---- setup.py.orig
> -+++ setup.py
> -@@ -180,7 +180,7 @@ class BuildExtCommand(build_ext):
> - # pylint: disable=attribute-defined-outside-init
> - self.define = self.configure_source_tree(compiler)
> -
> -- libtsk_path = os.path.join("sleuthkit", "tsk")
> -+ libtsk_path = os.path.join("${LOCALBASE}", "include", "tsk")
> -
> - if not os.access("pytsk3.c", os.R_OK):
> - # Generate the Python binding code (pytsk3.c).
> -@@ -390,7 +390,7 @@ class ProjectBuilder(object):
> - self._argv = argv
> -
> - # The path to the sleuthkit/tsk directory.
> -- self._libtsk_path = os.path.join("sleuthkit", "tsk")
> -+ self._libtsk_path = os.path.join("${LOCALBASE}", "include", "tsk")
> -
> - # Paths under the sleuthkit/tsk directory which contain files we need
> - # to compile.
> -@@ -400,13 +400,13 @@ class ProjectBuilder(object):
> - # The args for the extension builder.
> - self.extension_args = {
> - "define_macros": [],
> -- "include_dirs": ["talloc", self._libtsk_path, "sleuthkit", "."],
> -- "library_dirs": [],
> -- "libraries": []}
> -+ "include_dirs": [".", os.path.join("${LOCALBASE}", "include")],
> -+ "library_dirs": [os.path.join("${LOCALBASE}","lib")],
> -+ "libraries": ["tsk", "talloc"]}
> -
> - # The sources to build.
> - self._source_files = [
> -- "class.c", "error.c", "tsk3.c", "pytsk3.c", "talloc/talloc.c"]
> -+ "class.c", "error.c", "tsk3.c", "pytsk3.c"]
> -
> - # Path to the top of the unpacked sleuthkit sources.
> - self._sleuthkit_path = "sleuthkit"
> Index: pkg/DESCR
> ===================================================================
> RCS file: /cvs/ports/sysutils/py-tsk/pkg/DESCR,v
> diff -u -p -r1.1.1.1 DESCR
> --- pkg/DESCR 22 Jan 2017 08:18:04 -0000 1.1.1.1
> +++ pkg/DESCR 11 Feb 2026 20:24:25 -0000
> @@ -1 +1 @@
> - Python bindings for The Sleuth Kit (libtsk).
> +Python bindings for The Sleuth Kit (libtsk).
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/sysutils/py-tsk/pkg/PLIST,v
> diff -u -p -r1.7 PLIST
> --- pkg/PLIST 29 Apr 2025 10:40:03 -0000 1.7
> +++ pkg/PLIST 11 Feb 2026 20:24:25 -0000
> @@ -3,7 +3,5 @@ lib/python${MODPY_VERSION}/site-packages
>
> lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/METADATA
>
> lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/RECORD
>
> lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/WHEEL
>
> -lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/licenses/
>
> -lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/licenses/LICENSE
>
> lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/top_level.txt
> @so
> lib/python${MODPY_VERSION}/site-packages/pytsk3.${MODPY_PYC_MAGIC_TAG}so
>
UPDATE sysutils/py-tsk and take MAINTANER