Bug#1023767: neomutt: unable to find gpgme-config

2022-11-23 Thread Timo Röhling

* Daniel Kahn Gillmor  [2022-11-23 08:24]:

Thanks for confirming!  It'd be great to clear the decks for the gpgme
transition, so please let me know if you'd like me to NMU neomutt with
that patch, or if you have any plans for a release any time soon.

I'm not part of the Mutt maintainer team, unfortunately.
But I happen to have a fix for another bug [1] available, too.
I could address both bugs in one NMU if none of the actual
maintainers object.


Cheers
Timo


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018170

--
⢀⣴⠾⠻⢶⣦⠀   ╭╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling   │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄   ╰╯


signature.asc
Description: PGP signature


Bug#1023767: neomutt: unable to find gpgme-config

2022-11-23 Thread Daniel Kahn Gillmor
Hi Timo--

On Tue 2022-11-22 15:58:21 +0100, Timo Röhling wrote:
> I have built neomutt with your patch and can confirm that the GPGme
> integration works as expected.

Thanks for confirming!  It'd be great to clear the decks for the gpgme
transition, so please let me know if you'd like me to NMU neomutt with
that patch, or if you have any plans for a release any time soon.

all the best,

   --dkg


signature.asc
Description: PGP signature


Bug#1023767: neomutt: unable to find gpgme-config

2022-11-22 Thread Timo Röhling

Hi Daniel,

* Daniel Kahn Gillmor  [2022-11-21 19:24]:

The attached patch appears to fix things for me so that neomutt builds
successfully against libgpgme-dev 1.18.0-3, though i don't know enough
about how to adequately test neomutt to be confident in the results (i
don't use neomutt myself).

I have built neomutt with your patch and can confirm that the GPGme
integration works as expected.


Cheers
Timo

--
⢀⣴⠾⠻⢶⣦⠀   ╭╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling   │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄   ╰╯


signature.asc
Description: PGP signature


Bug#1023767: neomutt: unable to find gpgme-config

2022-11-21 Thread Daniel Kahn Gillmor
Control: tags 1023767 + patch

On Wed 2022-11-09 22:04:00 +0100, Timo Röhling wrote:
> neomutt fails to build with the recent libgpgme-dev update that dropped
> the gpgme-config executable.
>
> https://github.com/neomutt/neomutt/pull/3555 fixes the problem, but does
> not apply cleanly to the neomutt release in Debian, unfortunately.

The attached patch appears to fix things for me so that neomutt builds
successfully against libgpgme-dev 1.18.0-3, though i don't know enough
about how to adequately test neomutt to be confident in the results (i
don't use neomutt myself).

It's also on salsa at
https://salsa.debian.org/mutt-team/neomutt/-/merge_requests/8 if that's
useful.

Please let me know if you'd like me to NMU it.

   --dkg

From a9d3c0fe8c8e678311ad7a4810df6db519abc798 Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor 
Date: Mon, 21 Nov 2022 19:10:20 -0500
Subject: [PATCH] find modern versions of gpgme (Closes: #1023767)

---
 debian/patches/series |   1 +
 .../upstream/Use-pkgconf-to-find-GPGMe.patch  | 121 ++
 2 files changed, 122 insertions(+)
 create mode 100644 debian/patches/upstream/Use-pkgconf-to-find-GPGMe.patch

diff --git a/debian/patches/series b/debian/patches/series
index 8c37cf1cc..b0cb4f4fc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ upstream/964416-manpages-fixes.patch
 upstream/1020414-gsasl-support-prereq.patch
 upstream/1020414-gsasl-support.patch
 upstream/use-pkgconfig-for-libgpg-error.patch
+upstream/Use-pkgconf-to-find-GPGMe.patch
diff --git a/debian/patches/upstream/Use-pkgconf-to-find-GPGMe.patch b/debian/patches/upstream/Use-pkgconf-to-find-GPGMe.patch
new file mode 100644
index 0..f4c583cdb
--- /dev/null
+++ b/debian/patches/upstream/Use-pkgconf-to-find-GPGMe.patch
@@ -0,0 +1,121 @@
+From: Pietro Cerutti 
+Date: Mon, 7 Nov 2022 08:41:07 +
+Subject: Use pkgconf to find GPGMe
+
+(cherry-picked from upstream 516568f3f0769fad1c006a6b3a70884e97092a2a)
+---
+ Makefile.autosetup |  2 +-
+ auto.def   | 85 --
+ 2 files changed, 6 insertions(+), 81 deletions(-)
+
+diff --git a/Makefile.autosetup b/Makefile.autosetup
+index 3884704..24a2f17 100644
+--- a/Makefile.autosetup
 b/Makefile.autosetup
+@@ -572,7 +572,7 @@ $(PWD)/mutt:
+ LIBNCRYPT=	libncrypt.a
+ LIBNCRYPTOBJS=	ncrypt/config.o ncrypt/crypt.o ncrypt/cryptglue.o \
+ 		ncrypt/crypt_mod.o
+-@if HAVE_GPGME
++@if HAVE_PKG_GPGME
+ LIBNCRYPTOBJS+=	ncrypt/crypt_gpgme.o ncrypt/dlg_gpgme.o \
+ 		ncrypt/crypt_mod_pgp_gpgme.o ncrypt/crypt_mod_smime_gpgme.o
+ @endif
+diff --git a/auto.def b/auto.def
+index 12dc5d3..e0dcbb5 100644
+--- a/auto.def
 b/auto.def
+@@ -480,88 +480,13 @@ if {[get-define want-gpgme]} {
+ define-append CFLAGS -D_FILE_OFFSET_BITS=[get-define _FILE_OFFSET_BITS]
+   }
+ 
+-  msg-checking "Checking for GPGME..."
+-  if {1} {
+-# Locate gpgme-config
+-set gpgme_prefix [opt-val with-gpgme $prefix]
+-set gpgme_config_guess [file join $gpgme_prefix bin gpgme-config]
+-if {[file-isexec $gpgme_config_guess]} {
+-  define GPGME-CONFIG $gpgme_config_guess
+-} else {
+-  if {![cc-check-progs gpgme-config]} {
+-user-error "Unable to find gpgme-config"
+-  }
+-}
+-set gpgme_config [get-define GPGME-CONFIG]
+-
+-# Version
+-if {[catch {exec-with-stderr $gpgme_config --version} gpgme_version err]} {
+-  user-error "Could not derive --version from $gpgme_config"
+-}
+-if {[scan $gpgme_version "%d.%d.%d" gpgme_maj gpgme_min gpgme_patch] != 3} {
+-  user-error "Could not parse GPGME version $gpgme_version"
+-}
+-msg-result $gpgme_version
+-if {[get-define want-autocrypt]} {
+-  if {$gpgme_maj < 1 || $gpgme_min < 8} {
+-user-error "Found GPGME version $gpgme_version, need 1.8.0 for AutoCrypt"
+-  }
+-} else {
+-  if {$gpgme_maj < 1 || $gpgme_min < 4} {
+-user-error "Found GPGME version $gpgme_version, need 1.4.0"
+-  }
+-}
+-define GPGME_VERSION_NUMBER [format "0x%02x%02x%02x" $gpgme_maj $gpgme_min $gpgme_patch]
+-
+-# RHEL6 doesn't have this function yet
+-cc-check-function-in-lib gpgme_op_export_keys gpgme
+-
+-# CFLAGS
+-if {[catch {exec-with-stderr $gpgme_config --cflags} res err]} {
+-  user-error "Could not derive --cflags from $gpgme_config"
+-}
+-define-append CFLAGS $res
+-
+-# LIBS
+-if {[catch {exec-with-stderr $gpgme_config --libs} res err]} {
+-  user-error "Could not derive --libs from $gpgme_config"
+-}
+-define-append LIBS $res
+-  }
+-  define-feature gpgme
+-
+-  if {![get-define want-pkgconf] || ![pkgconf false gpg-error]} {
+-# Locate gpg-error-config
+-msg-checking "Checking for gpg-error..."
+-set gpg_error_config_guess [file join $gpgme_prefix bin gpg-error-config]
+-if {[file-isexec $gpg_error_config_guess]} {
+-  define GPG-ERROR-CONFIG 

Bug#1023767: neomutt: unable to find gpgme-config

2022-11-09 Thread Timo Röhling
Source: neomutt
Version: 20220429+dfsg1-4
Severity: serious
Tags: ftbfs fixed-upstream

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Dear maintainers,

neomutt fails to build with the recent libgpgme-dev update that dropped
the gpgme-config executable.

https://github.com/neomutt/neomutt/pull/3555 fixes the problem, but does
not apply cleanly to the neomutt release in Debian, unfortunately.


Cheers
Timo


-BEGIN PGP SIGNATURE-

iQGzBAEBCgAdFiEEJvtDgpxjkjCIVtam+C8H+466LVkFAmNsFbwACgkQ+C8H+466
LVlpVgv/bD+oKxopuwHl6lDnbkAWoTMXTWXuXxX37N7SIZOTP/N5s1FYU9LEAwMo
AJ8bagKV8JLrI3H62FjQ6IYL5anwFHH8g1voBp/K+AU4QOm0Cykp+4uVyLYb1MQl
p53lfPXxVHIqXeQbjWErBGbpSCgX/v4fVEG/5EEbyT8LjIqujOawbnS3QhxAxS6g
/dIgtBVw+MANS4oxKXnXHf+1iNm0uKlHGy2VzH+b8Nr4zVehYMnadwTBH1HPDgDH
Hy7ZR20XGpUQX4n4C5NzzkCTwqp+A/HfzvB/+wM3dPo3we3hocB/g40CI1UrW4dW
wRBX67hyw+XwSqakUvAxIbywSvnMs/bXA92GeeBhywbQ/Uyg4E8hC8oW1pn+YDrD
AwNXYbvuvg2r+oUxHubDNW3bPGwzNeAH9rvy+5GMJn7+zwWEa/RolTfsl6Zp4oDn
f29ukArzqvtDIqZk9cOmi/hDafOrwhSmZUECoJaxjaP3cjg9VrzGaQlBSyStJ71A
IicMLfkh
=fEPg
-END PGP SIGNATURE-