diff -pruN 4.3.1-5/debian/changelog 4.3.1-6/debian/changelog
--- 4.3.1-5/debian/changelog	2025-08-20 13:29:41.000000000 +0000
+++ 4.3.1-6/debian/changelog	2025-08-21 20:28:20.000000000 +0000
@@ -1,3 +1,13 @@
+dupeguru (4.3.1-6) unstable; urgency=medium
+
+  * debian/patches/errno.patch:
+    - Use errno.EISDIR and errno.EACCESS instead of hardcoding values,
+      fix FTBFS on GNU Hurd.
+  * debian/rules:
+    - Do not install .pytest_cache folder.
+
+ -- Luca Falavigna <dktrkranz@debian.org>  Thu, 21 Aug 2025 22:28:20 +0200
+
 dupeguru (4.3.1-5) unstable; urgency=medium
 
   * debian/patches/hurd-isolation_level.patch:
diff -pruN 4.3.1-5/debian/patches/errno.patch 4.3.1-6/debian/patches/errno.patch
--- 4.3.1-5/debian/patches/errno.patch	1970-01-01 00:00:00.000000000 +0000
+++ 4.3.1-6/debian/patches/errno.patch	2025-08-21 20:05:17.000000000 +0000
@@ -0,0 +1,52 @@
+Description: Use errno.EISDIR and errno.EACCESS instead of hardcoding values
+From: Luca Falavigna <dktrkranz@debian.org>
+Origin: upstream, https://github.com/arsenetar/dupeguru/commit/9f22835f73fe728fd726553d5ddb16104e1854c9
+
+Index: dupeguru-4.3.1/core/results.py
+===================================================================
+--- dupeguru-4.3.1.orig/core/results.py
++++ dupeguru-4.3.1/core/results.py
+@@ -10,6 +10,7 @@ import logging
+ import re
+ import os
+ import os.path as op
++from errno import EISDIR, EACCES
+ from xml.etree import ElementTree as ET
+
+ from hscommon.jobprogress.job import nulljob
+@@ -376,8 +377,8 @@ class Results(Markable):
+             do_write(outfile)
+         except OSError as e:
+             # If our OSError is because dest is already a directory, we want to handle that. 21 is
+-            # the code we get on OS X and Linux, 13 is what we get on Windows.
+-            if e.errno in {21, 13}:
++            # the code we get on OS X and Linux (EISDIR), 13 is what we get on Windows (EACCES).
++            if e.errno in (EISDIR, EACCES):
+                 p = str(outfile)
+                 dirname, basename = op.split(p)
+                 otherfiles = os.listdir(dirname)
+Index: dupeguru-4.3.1/hscommon/conflict.py
+===================================================================
+--- dupeguru-4.3.1.orig/hscommon/conflict.py
++++ dupeguru-4.3.1/hscommon/conflict.py
+@@ -14,6 +14,7 @@ import re
+ import os
+ import shutil
+
++from errno import EISDIR, EACCES
+ from pathlib import Path
+ from typing import Callable, List
+
+@@ -75,10 +76,8 @@ def smart_copy(source_path: Path, dest_p
+     try:
+         _smart_move_or_copy(shutil.copy, source_path, dest_path)
+     except OSError as e:
+-        if e.errno in {
+-            21,
+-            13,
+-        }:  # it's a directory, code is 21 on OS X / Linux and 13 on Windows
++        # It's a directory, code is 21 on OS X / Linux (EISDIR) and 13 on Windows (EACCES)
++        if e.errno in (EISDIR, EACCES):
+             _smart_move_or_copy(shutil.copytree, source_path, dest_path)
+         else:
+             raise
diff -pruN 4.3.1-5/debian/patches/series 4.3.1-6/debian/patches/series
--- 4.3.1-5/debian/patches/series	2025-08-20 13:23:31.000000000 +0000
+++ 4.3.1-6/debian/patches/series	2025-08-21 20:01:34.000000000 +0000
@@ -1,3 +1,4 @@
 hurd-isolation_level.patch
 requires.patch
 importlib.patch
+errno.patch
diff -pruN 4.3.1-5/debian/rules 4.3.1-6/debian/rules
--- 4.3.1-5/debian/rules	2025-08-20 12:32:18.000000000 +0000
+++ 4.3.1-6/debian/rules	2025-08-21 20:27:27.000000000 +0000
@@ -17,6 +17,7 @@ execute_after_dh_install:
 	rm -fr debian/dupeguru/usr/share/dupeguru/hscommon/tests/
 	rm -fr debian/dupeguru/usr/share/dupeguru/qt/pe/modules/
 	rm -fr debian/dupeguru/usr/share/dupeguru/dupeguru
+	rm -fr debian/dupeguru/usr/share/dupeguru/.pytest_cache/
 	mv debian/dupeguru/usr/share/dupeguru/core/pe \
 		debian/dupeguru/usr/lib/dupeguru/core
 	mv debian/dupeguru/usr/share/dupeguru/qt/pe \
