As promised, here is the patch.

Note: I have actually tested it, and it fixed the build failure for me.
(Thanks to Sergei Trofimovich who helped me to find the fix in the git repo)

Thanks.
commit e1cc73faee68409dfdac07a39dca517813a40e2c
Author: Santiago Vila <sanv...@debian.org>
Date:   Fri May 10 14:45:00 2024 +0200

    Cherry-pick two upstream patches to fix makefile bug. Closes: #1070857.

diff --git a/debian/patches/0013-fix-makefile-bug.patch 
b/debian/patches/0013-fix-makefile-bug.patch
new file mode 100644
index 000000000..3765db1ec
--- /dev/null
+++ b/debian/patches/0013-fix-makefile-bug.patch
@@ -0,0 +1,22 @@
+From: John Ericson <John.Ericson@Obsidian.Systems>
+Date: Tue Nov 14 11:42:25 2023 -0500
+Subject: Fix makefile bug confusing `libnixutil-test` exe vs lib
+Bug-Debian: https://bugs.debian.org/1070857
+Origin: upstream, 
https://github.com/NixOS/nix/commit/9c7749e13508996eb9df83b1692664cc8cdbf952
+Forwarded: not-needed
+Last-Update: 2024-05-10
+
+The `-exe` variant is the program, the unsuffixed variant is the library.
+
+The corrected usage matches `libnixstore-test`.
+
+--- a/src/libutil/tests/local.mk
++++ b/src/libutil/tests/local.mk
+@@ -1,6 +1,6 @@
+ check: libutil-tests_RUN
+ 
+-programs += libutil-tests
++programs += libutil-tests-exe
+ 
+ libutil-tests-exe_NAME = libnixutil-tests
+ 
diff --git a/debian/patches/0014-fix-make-check.patch 
b/debian/patches/0014-fix-make-check.patch
new file mode 100644
index 000000000..f96519e34
--- /dev/null
+++ b/debian/patches/0014-fix-make-check.patch
@@ -0,0 +1,19 @@
+From: John Ericson <John.Ericson@Obsidian.Systems>
+Date: Fri Nov 17 11:26:45 2023 -0500
+Subject: Fix `make check`
+Bug-Debian: https://bugs.debian.org/1070857
+Origin: upstream, 
https://github.com/NixOS/nix/commit/293ae592576bb9c48975466613fcba6a30d06f5e
+Forwarded: not-needed
+Last-Update: 2024-05-10
+
+After 9c7749e13508996eb9df83b1692664cc8cdbf952, `libutil-tests_RUN`
+doesn't exist. It needs to become `libutil-tests-exe_RUN`.
+
+--- a/src/libutil/tests/local.mk
++++ b/src/libutil/tests/local.mk
+@@ -1,4 +1,4 @@
+-check: libutil-tests_RUN
++check: libutil-tests-exe_RUN
+ 
+ programs += libutil-tests-exe
+ 
diff --git a/debian/patches/series b/debian/patches/series
index ef37b55cc..cd4bc73d9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,5 @@
 0010-libexpr-Add-various-files-to-clean-files.patch
 0011-manual-Add-various-files-to-clean-files.patch
 0012-nix-Add-various-files-to-clean-files.patch
+0013-fix-makefile-bug.patch
+0014-fix-make-check.patch

Reply via email to