notmuch: update to 0.38.

This commit is contained in:
Đoàn Trần Công Danh 2023-10-01 21:11:24 +07:00
parent 746748d894
commit e95db4256e
6 changed files with 75 additions and 127 deletions

View file

@ -1,12 +1,3 @@
From 5402e4d357d7957942acc4b906b58102b6bd4fdf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 27 Jul 2020 15:46:35 +0700
Subject: [PATCH] configure: detect version by compiler for build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We'll need to run the compiled binary to report our current version.
With the same code base, we should have the same version information
@ -16,17 +7,9 @@ Let's use the compiler for building architecture to build the reporting
binary. Which is usually reported under variable CC_FOR_BUILD,
a convention established by GNU Autotools, and fall back to CC if it's
not defined.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
configure | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 80cbac4f..6c77960f 100755
--- a/configure
+++ b/configure
@@ -85,8 +85,10 @@ fi
@@ -89,8 +89,10 @@ fi
BASHCMD=${BASHCMD:-bash}
PERL=${PERL:-perl}
CC=${CC:-cc}
@ -37,7 +20,7 @@ index 80cbac4f..6c77960f 100755
CPPFLAGS=${CPPFLAGS:-}
CXXFLAGS_for_sh=${CXXFLAGS:-${CFLAGS}}
CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}
@@ -409,7 +411,7 @@ int main(void) {
@@ -448,7 +450,7 @@ int main(void) {
return 0;
}
EOF
@ -46,6 +29,3 @@ index 80cbac4f..6c77960f 100755
&& ./_libversion > _libversion.sh && . ./_libversion.sh
then
printf "OK.\n"
--
2.28.0.rc2.21.g5c06d60fc5

View file

@ -1,29 +1,10 @@
From 7589537f76541254d70d1b7df1ce57f0977ef9f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 27 Jul 2020 22:47:15 +0700
Subject: [PATCH] configure: drop gmime session key extraction support check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Void Linux gmime3 always support session key extraction.
No suitable for upstream.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
configure | 58 -------------------------------------------------------
1 file changed, 58 deletions(-)
diff --git a/configure b/configure
index 36f3f606..1bf2097d 100755
--- a/configure
+++ b/configure
@@ -492,65 +492,7 @@ if pkg-config --exists "gmime-3.0 >= $GMIME_MINVER"; then
@@ -506,65 +506,7 @@ if pkg-config --exists "gmime-3.0 >= $GM
printf "Checking for GMime session key extraction support... "
- cat > _check_session_keys.c <<EOF
-#include <gmime/gmime.h>
-#include <stdio.h>
@ -57,9 +38,9 @@ index 36f3f606..1bf2097d 100755
- printf 'No.\nCould not make tempdir for testing session-key support.\n'
- errors=$((errors + 1))
- elif ${CC} ${CFLAGS} ${gmime_cflags} _check_session_keys.c ${gmime_ldflags} -o _check_session_keys \
- && GNUPGHOME=${TEMP_GPG} gpg --batch --quiet --import < "$srcdir"/test/gnupg-secret-key.asc \
- && GNUPGHOME=${TEMP_GPG} gpg --batch --quiet --import < "$srcdir"/test/openpgp4-secret-key.asc \
- && SESSION_KEY=$(GNUPGHOME=${TEMP_GPG} ./_check_session_keys) \
- && [ $SESSION_KEY = 9:0BACD64099D1468AB07C796F0C0AC4851948A658A15B34E803865E9FC635F2F5 ]
- && [ $SESSION_KEY = 9:496A0B6D15A5E7BA762FB8E5FE6DEE421D4D9BBFCEAD1CDD0CCF636D07ADE621 ]
- then
printf "OK.\n"
- else
@ -73,8 +54,8 @@ index 36f3f606..1bf2097d 100755
-Please try to rebuild your version of GMime against a more recent
-version of GPGME (at least GPGME 1.8.0).
-EOF
- if command -v gpgme-config >/dev/null; then
- printf 'Your current GPGME development version is: %s\n' "$(gpgme-config --version)"
- if GPGME_VERS="$(pkg-config --modversion gpgme || gpgme-config --version)"; then
- printf 'Your current GPGME development version is: %s\n' "$GPGME_VERS"
- else
- printf 'You do not have the GPGME development libraries installed.\n'
- fi
@ -83,8 +64,6 @@ index 36f3f606..1bf2097d 100755
- if [ -n "$TEMP_GPG" -a -d "$TEMP_GPG" ]; then
- rm -rf "$TEMP_GPG"
- fi
# see https://github.com/jstedfast/gmime/pull/90
# should be fixed in GMime in 3.2.7, but some distros might patch
--
2.35.1
cat > _check_gmime_cert.c <<EOF
#include <stdio.h>

View file

@ -1,28 +1,11 @@
From c6188909672b425fda3d0ecc0ec5163251064324 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 27 Jul 2020 22:49:47 +0700
Subject: [PATCH] configure: drop gmime x509 certificate validity check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The problem has been fixed with gmime 3.2.7 already.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
configure | 69 -------------------------------------------------------
1 file changed, 69 deletions(-)
diff --git a/configure b/configure
index 36f3f606..fd23aa67 100755
--- a/configure
+++ b/configure
@@ -556,77 +556,8 @@ EOF
# should be fixed in GMime in 3.2.7, but some distros might patch
printf "Checking for GMime X.509 certificate validity... "
- cat > _check_x509_validity.c <<EOF
@@ -508,96 +508,13 @@ if pkg-config --exists "gmime-3.0 >= $GM
printf "OK.\n"
- cat > _check_gmime_cert.c <<EOF
-#include <stdio.h>
-#include <gmime/gmime.h>
-
@ -34,7 +17,6 @@ index 36f3f606..fd23aa67 100755
- GMimeSignature *sig = NULL;
- GMimeCertificate *cert = NULL;
- GMimeObject *output = NULL;
- GMimeValidity validity = GMIME_VALIDITY_UNKNOWN;
- int len;
-
- g_mime_init ();
@ -55,16 +37,27 @@ index 36f3f606..fd23aa67 100755
- if (sig == NULL) return !! fprintf (stderr, "no GMimeSignature found at position 0\n");
- cert = g_mime_signature_get_certificate (sig);
- if (cert == NULL) return !! fprintf (stderr, "no GMimeCertificate found\n");
- validity = g_mime_certificate_get_id_validity (cert);
-#ifdef CHECK_VALIDITY
- GMimeValidity validity = g_mime_certificate_get_id_validity (cert);
- if (validity != GMIME_VALIDITY_FULL) return !! fprintf (stderr, "Got validity %d, expected %d\n", validity, GMIME_VALIDITY_FULL);
-
-#endif
-#ifdef CHECK_EMAIL
- const char *email = g_mime_certificate_get_email (cert);
- if (! email) return !! fprintf (stderr, "no email returned");
- if (email[0] == '<') return 2;
-#endif
- return 0;
-}
-EOF
-
- # see https://github.com/jstedfast/gmime/pull/90
- # should be fixed in GMime in 3.2.7, but some distros might patch
printf "Checking for GMime X.509 certificate validity... "
- if ! TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX"); then
- printf 'No.\nCould not make tempdir for testing X.509 certificate validity support.\n'
- errors=$((errors + 1))
- elif ${CC} ${CFLAGS} ${gmime_cflags} _check_x509_validity.c ${gmime_ldflags} -o _check_x509_validity \
- elif ${CC} -DCHECK_VALIDITY ${CFLAGS} ${gmime_cflags} _check_gmime_cert.c ${gmime_ldflags} -o _check_x509_validity \
- && echo disable-crl-checks > "$TEMP_GPG/gpgsm.conf" \
- && echo "4D:E0:FF:63:C0:E9:EC:01:29:11:C8:7A:EE:DA:3A:9A:7F:6E:C1:0D S" >> "$TEMP_GPG/trustlist.txt" \
- && GNUPGHOME=${TEMP_GPG} gpgsm --batch --quiet --import < "$srcdir"/test/smime/ca.crt
@ -85,6 +78,15 @@ index 36f3f606..fd23aa67 100755
-EOF
- errors=$((errors + 1))
- fi
- fi
printf "Checking whether GMime emits email addresses with angle brackets... "
- if ${CC} -DCHECK_EMAIL ${CFLAGS} ${gmime_cflags} _check_gmime_cert.c ${gmime_ldflags} -o _check_email &&
- GNUPGHOME=${TEMP_GPG} ./_check_email; then
- gmime_emits_angle_brackets=0
- printf "No.\n"
- else
gmime_emits_angle_brackets=1
printf "Yes.\n"
- fi
- else
- printf 'No.\nFailed to set up gpgsm for testing X.509 certificate validity support.\n'
@ -93,8 +95,6 @@ index 36f3f606..fd23aa67 100755
- if [ -n "$TEMP_GPG" -a -d "$TEMP_GPG" ]; then
- rm -rf "$TEMP_GPG"
- fi
# see https://dev.gnupg.org/T3464
# there are problems verifying signatures when decrypting with session keys with GPGME 1.13.0 and 1.13.1
--
2.35.1

View file

@ -1,31 +1,13 @@
From 9a5a11fca4e2236d7b559e511fcc686fd382b985 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 27 Jul 2020 23:00:13 +0700
Subject: [PATCH] configure: drop gmime verify with session key check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The problem is fixed with gpgme 1.14.0.
We'll force a conflicts with gpgme older than 1.14.0, so nothing to
worry about.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
configure | 66 -------------------------------------------------------
1 file changed, 66 deletions(-)
diff --git a/configure b/configure
index 36f3f606..cd99bf4a 100755
--- a/configure
+++ b/configure
@@ -631,74 +631,8 @@ EOF
# see https://dev.gnupg.org/T3464
@@ -520,73 +520,8 @@ if pkg-config --exists "gmime-3.0 >= $GM
# there are problems verifying signatures when decrypting with session keys with GPGME 1.13.0 and 1.13.1
printf "Checking signature verification when decrypting using session keys... "
-
- cat > _verify_sig_with_session_key.c <<EOF
-#include <stdio.h>
-#include <gmime/gmime.h>
@ -49,7 +31,7 @@ index 36f3f606..cd99bf4a 100755
- body = GMIME_MULTIPART_ENCRYPTED(g_mime_message_get_mime_part (g_mime_parser_construct_message (parser, NULL)));
- if (body == NULL) return !! fprintf (stderr, "did not find a multipart/encrypted message\n");
-
- output = g_mime_multipart_encrypted_decrypt (body, GMIME_DECRYPT_NONE, "9:13607E4217515A70EC8DF9DBC16C5327B94577561D98AD1246FA8756659C7899", &result, &error);
- output = g_mime_multipart_encrypted_decrypt (body, GMIME_DECRYPT_NONE, "9:9E1CDF53BBF794EA34F894B5B68E1E56FB015EA69F81D2A5EAB7F96C7B65783E", &result, &error);
- if (error || output == NULL) return !! fprintf (stderr, "decrypt failed\n");
-
- sig_list = g_mime_decrypt_result_get_signatures (result);
@ -70,7 +52,7 @@ index 36f3f606..cd99bf4a 100755
- printf 'No.\nCould not make tempdir for testing signature verification when decrypting with session keys.\n'
- errors=$((errors + 1))
- elif ${CC} ${CFLAGS} ${gmime_cflags} _verify_sig_with_session_key.c ${gmime_ldflags} -o _verify_sig_with_session_key \
- && GNUPGHOME=${TEMP_GPG} gpg --batch --quiet --import < "$srcdir"/test/gnupg-secret-key.asc \
- && GNUPGHOME=${TEMP_GPG} gpg --batch --quiet --import < "$srcdir"/test/openpgp4-secret-key.asc \
- && rm -f ${TEMP_GPG}/private-keys-v1.d/*.key
- then
- if GNUPGHOME=${TEMP_GPG} ./_verify_sig_with_session_key; then
@ -96,5 +78,3 @@ index 36f3f606..cd99bf4a 100755
else
have_gmime=0
printf "No.\n"
--
2.35.1

View file

@ -1,25 +1,26 @@
# Template file for 'notmuch'
pkgname=notmuch
version=0.35
revision=3
version=0.38
revision=1
build_style=configure
build_helper=python3
configure_args="--prefix=/usr
--emacslispdir=/usr/share/emacs/site-lisp/notmuch
--emacsetcdir=/usr/share/emacs/site-lisp/notmuch"
hostmakedepends="perl pkg-config python3-Sphinx python3-devel texinfo
desktop-file-utils emacs gnupg python3-setuptools"
desktop-file-utils emacs gnupg python3-setuptools python3-cffi"
makedepends="bash-completion gmime3-devel talloc-devel xapian-core-devel
python3-cffi"
depends="gmime3>=3.2.7"
checkdepends="python3-pytest mdocml dtach gdb tar xz xapian-core
openssl"
short_desc="Thread-based email index, search, and tagging"
maintainer="Joachim T. <jtrouverie@joakode.fr>"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://notmuchmail.org"
distfiles="https://notmuchmail.org/releases/notmuch-${version}.tar.xz
https://notmuchmail.org/releases/test-databases/database-v1.tar.xz"
checksum="a831c414c4f20a6cae3a580793c855102d3295080f000eb3832b77226a40ac39
checksum="a17901adbe43f481a6bf53c15a2a20268bc8dc7ad5ccf685a0d17c1456dbaf6e
4299e051b10e1fa7b33ea2862790a09ebfe96859681804e5251e130f800e69d2"
skip_extraction="database-v1.tar.xz"
replaces="notmuch-emacs>=0"
@ -27,7 +28,8 @@ replaces="notmuch-emacs>=0"
# Not a real conflicts, but this package is broken with gpgme 1.13.1-
# gpgme is optional dependency
conflicts="gpgme<1.14.0_1"
subpackages="libnotmuch libnotmuch-devel notmuch-mutt notmuch-python3"
subpackages="libnotmuch libnotmuch-devel notmuch-mutt
notmuch-python3 python3-notmuch2"
if [ ! "$CROSS_BUILD" ]; then
makedepends+=" ruby-devel"
@ -37,13 +39,14 @@ fi
do_build() {
make ${makejobs}
make -C contrib/notmuch-mutt
cd bindings/python
cd ${wrksrc}/bindings/python
python3 setup.py build --build-base=build
cd ${wrksrc}/bindings/python-cffi
python3 setup.py build --build-base=build
}
do_check() {
cp $XBPS_SRCDISTDIR/notmuch-$version/database-v1.tar.xz \
test/test-databases
vsrccopy database-v1.tar.xz test/test-databases
if [ "$XBPS_TARGET_LIBC" = musl ]; then
# Seem like gpgconf's problem,
# mutt on musl also have problems with smime
@ -55,6 +58,7 @@ do_check() {
# libconfig because of fqdn
# we don't ship python-cffi
NOTMUCH_SKIP_TESTS+=" libconfig python-cffi"
NOTMUCH_SKIP_TESTS+=" crypto index-decryption"
if [ $(id -u) = 0 ]; then
NOTMUCH_SKIP_TESTS+=" new.36 new.39 tagging.25"
fi
@ -64,13 +68,6 @@ do_check() {
do_install() {
make DESTDIR=${DESTDIR} install
cd bindings/python
python3 setup.py build --build-base=build \
install --prefix=/usr --root=${DESTDIR}
cd -
if [ ! "$CROSS_BUILD" ]; then
make DESTDIR=${DESTDIR} -C bindings/ruby install
fi
rm -f ${DESTDIR}/usr/share/applications/mimeinfo.cache
}
@ -92,7 +89,7 @@ libnotmuch-devel_package() {
notmuch-mutt_package() {
short_desc+=" - Mutt interface"
depends="${sourcepkg}-${version}_${revision} perl-Mail-Box perl-MailTools
depends="notmuch mutt perl-Mail-Box perl-MailTools
perl-String-ShellQuote perl-Term-ReadLine-Gnu perl-File-Which"
pkg_install() {
vbin contrib/notmuch-mutt/notmuch-mutt
@ -101,17 +98,28 @@ notmuch-mutt_package() {
}
notmuch-python3_package() {
depends="libnotmuch-${version}_${revision}"
depends="libnotmuch python3"
short_desc+=" - Python 3 bindings"
pkg_install() {
vmove ${py3_sitelib}
cd ${wrksrc}/bindings/python
python3 setup.py build --build-base=build \
install --prefix=/usr --root=${PKGDESTDIR}
}
}
python3-notmuch2_package() {
depends="libnotmuch python3"
short_desc+=" - Python 3 cffi bindings"
pkg_install() {
cd ${wrksrc}/bindings/python-cffi
python3 setup.py build --build-base=build \
install --prefix=/usr --root=${PKGDESTDIR}
}
}
notmuch-ruby_package() {
depends="libnotmuch-${version}_${revision} ruby"
short_desc+=" - Ruby bindings"
pkg_install() {
vmove usr/lib/ruby
make DESTDIR=${PKGDESTDIR} -C bindings/ruby install
}
}

1
srcpkgs/python3-notmuch2 Symbolic link
View file

@ -0,0 +1 @@
notmuch