build: drop support for gmime-2.6

GMime 3.0 is over 2 years old now, and 2.6 has been deprecated in
notmuch for about 1.5 years.

Comments and documentation no longer need to refer to GMime 2.6, so
clean them all up.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
David Bremner 2019-05-02 09:19:33 -04:00
parent 2dfbd26c42
commit 570349e132
6 changed files with 12 additions and 32 deletions

View file

@ -20,7 +20,7 @@ configure stage.
Dependencies Dependencies
------------ ------------
Notmuch depends on four libraries: Xapian, GMime 2.6, Notmuch depends on four libraries: Xapian, GMime 3.0,
Talloc, and zlib which are each described below: Talloc, and zlib which are each described below:
Xapian Xapian

24
configure vendored
View file

@ -489,30 +489,16 @@ EOF
rm -rf test.db _default_backend _default_backend.cc rm -rf test.db _default_backend _default_backend.cc
fi fi
# we need to have a version >= 2.6.5 to avoid a crypto bug. We need GMIME_MINVER=3.0.3
# 2.6.7 for permissive "From " header handling.
GMIME_MINVER=2.6.7
GMIME3_MINVER=3.0.3
printf "Checking for GMime development files... " printf "Checking for GMime development files... "
if pkg-config --exists "gmime-3.0 > $GMIME3_MINVER"; then if pkg-config --exists "gmime-3.0 > $GMIME_MINVER"; then
printf "Yes (3.0).\n" printf "Yes.\n"
have_gmime=1 have_gmime=1
gmime_cflags=$(pkg-config --cflags gmime-3.0) gmime_cflags=$(pkg-config --cflags gmime-3.0)
gmime_ldflags=$(pkg-config --libs gmime-3.0) gmime_ldflags=$(pkg-config --libs gmime-3.0)
gmime_major=3 gmime_major=3
have_gmime_session_keys=1 have_gmime_session_keys=1
elif pkg-config --exists "gmime-2.6 >= $GMIME_MINVER"; then
printf "Yes (2.6).\n"
have_gmime=1
gmime_cflags=$(pkg-config --cflags gmime-2.6)
gmime_ldflags=$(pkg-config --libs gmime-2.6)
gmime_major=2
if pkg-config --exists "gmime-2.6 >= 2.6.21"; then
have_gmime_session_keys=1
else
have_gmime_session_keys=0
fi
else else
have_gmime=0 have_gmime=0
have_gmime_session_keys=0 have_gmime_session_keys=0
@ -788,7 +774,7 @@ EOF
echo echo
fi fi
if [ $have_gmime -eq 0 ]; then if [ $have_gmime -eq 0 ]; then
echo " GMime 2.6 library >= $GMIME_MINVER" echo " GMime library >= $GMIME_MINVER"
echo " (including development files such as headers)" echo " (including development files such as headers)"
echo " https://github.com/jstedfast/gmime/" echo " https://github.com/jstedfast/gmime/"
echo echo
@ -810,7 +796,7 @@ case a simple command will install everything you need. For example:
On Debian and similar systems: On Debian and similar systems:
sudo apt-get install libxapian-dev libgmime-2.6-dev libtalloc-dev zlib1g-dev sudo apt-get install libxapian-dev libgmime-3.0-dev libtalloc-dev zlib1g-dev
Or on Fedora and similar systems: Or on Fedora and similar systems:

2
debian/control vendored
View file

@ -11,7 +11,7 @@ Build-Depends:
debhelper (>= 11~), debhelper (>= 11~),
pkg-config, pkg-config,
libxapian-dev, libxapian-dev,
libgmime-3.0-dev (>= 3.0.3~) | libgmime-2.6-dev (>= 2.6.7~), libgmime-3.0-dev (>= 3.0.3~),
libtalloc-dev, libtalloc-dev,
libz-dev, libz-dev,
python-all (>= 2.6.6-3~), python-all (>= 2.6.6-3~),

View file

@ -149,7 +149,7 @@ DONE:
return status; return status;
} }
/* Signature list destructor (GMime 2.6) */ /* Signature list destructor */
static int static int
_signature_list_free (GMimeSignatureList **proxy) _signature_list_free (GMimeSignatureList **proxy)
{ {
@ -157,7 +157,7 @@ _signature_list_free (GMimeSignatureList **proxy)
return 0; return 0;
} }
/* Set up signature list destructor (GMime 2.6) */ /* Set up signature list destructor */
static void static void
set_signature_list_destructor (mime_node_t *node) set_signature_list_destructor (mime_node_t *node)
{ {
@ -168,7 +168,7 @@ set_signature_list_destructor (mime_node_t *node)
} }
} }
/* Verify a signed mime node (GMime 2.6) */ /* Verify a signed mime node */
static void static void
node_verify (mime_node_t *node, GMimeObject *part, node_verify (mime_node_t *node, GMimeObject *part,
g_mime_3_unused(GMimeCryptoContext *cryptoctx)) g_mime_3_unused(GMimeCryptoContext *cryptoctx))
@ -189,7 +189,7 @@ node_verify (mime_node_t *node, GMimeObject *part,
g_error_free (err); g_error_free (err);
} }
/* Decrypt and optionally verify an encrypted mime node (GMime 2.6) */ /* Decrypt and optionally verify an encrypted mime node */
static void static void
node_decrypt_and_verify (mime_node_t *node, GMimeObject *part, node_decrypt_and_verify (mime_node_t *node, GMimeObject *part,
g_mime_3_unused(GMimeCryptoContext *cryptoctx)) g_mime_3_unused(GMimeCryptoContext *cryptoctx))

View file

@ -325,12 +325,6 @@ add_recipients_from_message (GMimeMessage *reply,
GMimeMessage *message, GMimeMessage *message,
bool reply_all) bool reply_all)
{ {
/* There is a memory leak here with gmime-2.6 because get_sender
* returns a newly allocated list, while the others return
* references to libgmime owned data. This leak will be fixed with
* the transition to gmime-3.0.
*/
struct { struct {
InternetAddressList * (*get_header)(GMimeMessage *message); InternetAddressList * (*get_header)(GMimeMessage *message);
GMimeRecipientType recipient_type; GMimeRecipientType recipient_type;

View file

@ -427,7 +427,7 @@ format_signature_errors (sprinter_t *sp, GMimeSignature *signature)
} }
#endif #endif
/* Signature status sprinter (GMime 2.6) */ /* Signature status sprinter */
static void static void
format_part_sigstatus_sprinter (sprinter_t *sp, GMimeSignatureList *siglist) format_part_sigstatus_sprinter (sprinter_t *sp, GMimeSignatureList *siglist)
{ {