Bjorn Ketelaars wrote:
> Diff below updates notmuch to 0.33.2. Changelog can be found at [0].
> 
> Changes to the port:
> - Bump minor of libnotmuch as several symbols have been added
> - Patch a test so that we do not need gsed
> 
> Tests:
> - Several tests fail because of seemingly failing LD_PRELOAD=shim. I'm
>   not sure what the issue is. Maybe someone knows?
> - Run tested on amd64 in combination with neomutt
> 
> Comments/OK?

Hi Bjoern,

I figured out the LD_PRELOAD issue. LD_PRELOAD is empty at first,
then the shim_file is appended, which leads to a line that reads
LD_PRELOAD=:./shim_file.so [...]

Our ld code does not ignore empty elements in the list,
which explains the error: can't load library ''<- empty.

This fixed it for me:

-    LD_PRELOAD=${LD_PRELOAD:+:$LD_PRELOAD}:./${shim_file} notmuch-shared "$@"
+    LD_PRELOAD=./${shim_file} notmuch-shared "$@"

and makes these tests pass:

PASS   EXIT_FAILURE when index_file returns FILE_NOT_EMAIL
PASS   success exit with --keep when index_file returns FILE_NOT_EMAIL
PASS   EXIT_FAILURE when index_file returns READ_ONLY_DATABASE
PASS   success exit with --keep when index_file returns READ_ONLY_DATABASE
PASS   EXIT_FAILURE when index_file returns UPGRADE_REQUIRED
PASS   success exit with --keep when index_file returns UPGRADE_REQUIRED
PASS   EXIT_FAILURE when index_file returns PATH_ERROR
PASS   success exit with --keep when index_file returns PATH_ERROR
PASS   EX_TEMPFAIL when index_file returns OUT_OF_MEMORY
PASS   success exit with --keep when index_file returns OUT_OF_MEMORY
PASS   EX_TEMPFAIL when index_file returns XAPIAN_EXCEPTION
PASS   success exit with --keep when index_file returns XAPIAN_EXCEPTION

So we're going down from 16 failing tests to 3.

I don't see any other place where LD_PRELOAD is being set before the
shim is appended. So removing the append logic should be fine.

Updated patch below.

Best regards,
Stefan

Index: Makefile.inc
===================================================================
RCS file: /home/cvs/ports/mail/notmuch/Makefile.inc,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 Makefile.inc
--- Makefile.inc        14 Mar 2021 19:50:49 -0000      1.5
+++ Makefile.inc        13 Oct 2021 05:46:30 -0000
@@ -1,6 +1,6 @@
 # $OpenBSD: Makefile.inc,v 1.5 2021/03/14 19:50:49 bket Exp $
 
-V =                    0.31.4
+V =                    0.33.2
 DISTNAME =             notmuch-$V
 EXTRACT_SUFX =         .tar.xz
 
Index: notmuch/Makefile
===================================================================
RCS file: /home/cvs/ports/mail/notmuch/notmuch/Makefile,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 Makefile
--- notmuch/Makefile    4 Jul 2021 19:02:09 -0000       1.13
+++ notmuch/Makefile    13 Oct 2021 05:46:30 -0000
@@ -6,9 +6,7 @@ COMMENT-emacs =         Emacs bindings for notm
 PKGNAME-main =         notmuch-${V}
 PKGNAME-emacs =                notmuch-emacs-${V}
 
-REVISION =             0
-
-SHARED_LIBS +=         notmuch 1.0
+SHARED_LIBS +=         notmuch 1.1
 
 MULTI_PACKAGES =       -main -emacs
 DEBUG_PACKAGES =       -main
Index: notmuch/distinfo
===================================================================
RCS file: /home/cvs/ports/mail/notmuch/notmuch/distinfo,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 distinfo
--- notmuch/distinfo    14 Mar 2021 19:50:49 -0000      1.5
+++ notmuch/distinfo    13 Oct 2021 05:46:30 -0000
@@ -1,2 +1,2 @@
-SHA256 (notmuch-0.31.4.tar.xz) = hmG2ZWdmD9YwrxDEZHwwMn/dGzSpiMq4DWFDKKW3T1U=
-SIZE (notmuch-0.31.4.tar.xz) = 713888
+SHA256 (notmuch-0.33.2.tar.xz) = JEiS9qtSqE9rATs4fNZlLUYe/9NrFO+eV2YEtYULLK4=
+SIZE (notmuch-0.33.2.tar.xz) = 733228
Index: notmuch/patches/patch-lib_Makefile_local
===================================================================
RCS file: 
/home/cvs/ports/mail/notmuch/notmuch/patches/patch-lib_Makefile_local,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-lib_Makefile_local
--- notmuch/patches/patch-lib_Makefile_local    13 Aug 2020 18:21:19 -0000      
1.2
+++ notmuch/patches/patch-lib_Makefile_local    13 Oct 2021 05:46:30 -0000
@@ -26,7 +26,7 @@ Index: lib/Makefile.local
  endif
  ifeq ($(LIBDIR_IN_LDCONFIG),1)
  ifeq ($(DESTDIR),)
-@@ -69,19 +73,23 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules)
+@@ -73,19 +77,23 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules)
  $(dir)/$(LIBNAME): $(libnotmuch_modules) util/libnotmuch_util.a 
parse-time-string/libparse-time-string.a
        $(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) 
$(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ util/libnotmuch_util.a 
parse-time-string/libparse-time-string.a
  
Index: notmuch/patches/patch-test_test-lib_sh
===================================================================
RCS file: /home/cvs/ports/mail/notmuch/notmuch/patches/patch-test_test-lib_sh,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-test_test-lib_sh
--- notmuch/patches/patch-test_test-lib_sh      5 Oct 2020 19:46:17 -0000       
1.3
+++ notmuch/patches/patch-test_test-lib_sh      13 Oct 2021 06:23:36 -0000
@@ -13,3 +13,12 @@ Index: test/test-lib.sh
  
  # Protect ourselves from common misconfiguration to export
  # CDPATH into the environment
+@@ -939,7 +938,7 @@ notmuch_with_shim () {
+     base_name="$1"
+     shift
+     shim_file="${base_name}.so"
+-    LD_PRELOAD=${LD_PRELOAD:+:$LD_PRELOAD}:./${shim_file} notmuch-shared "$@"
++    LD_PRELOAD=./${shim_file} notmuch-shared "$@"
+ }
+ 
+ # Creates a script that counts how much time it is executed and calls
Index: py-notmuch/distinfo
===================================================================
RCS file: /home/cvs/ports/mail/notmuch/py-notmuch/distinfo,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 distinfo
--- py-notmuch/distinfo 14 Mar 2021 19:50:49 -0000      1.5
+++ py-notmuch/distinfo 13 Oct 2021 05:46:30 -0000
@@ -1,2 +1,2 @@
-SHA256 (notmuch-0.31.4.tar.xz) = hmG2ZWdmD9YwrxDEZHwwMn/dGzSpiMq4DWFDKKW3T1U=
-SIZE (notmuch-0.31.4.tar.xz) = 713888
+SHA256 (notmuch-0.33.2.tar.xz) = JEiS9qtSqE9rATs4fNZlLUYe/9NrFO+eV2YEtYULLK4=
+SIZE (notmuch-0.33.2.tar.xz) = 733228

Reply via email to