aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobraun <obraun@FreeBSD.org>2003-01-25 06:17:59 +0800
committerobraun <obraun@FreeBSD.org>2003-01-25 06:17:59 +0800
commitb6603ff3056123aacb22e72cb9aaa8f1f5492043 (patch)
tree86b60a8292eb69c6d7bb91b8b75c008ede9e7f0b
parent37fddaca98de22e92ce6a23239c1fe7c921949ca (diff)
downloadfreebsd-ports-gnome-b6603ff3056123aacb22e72cb9aaa8f1f5492043.tar.gz
freebsd-ports-gnome-b6603ff3056123aacb22e72cb9aaa8f1f5492043.tar.zst
freebsd-ports-gnome-b6603ff3056123aacb22e72cb9aaa8f1f5492043.zip
Reactivate the two knobs WITH_MUTT_PGP_PATCH and WITH_MUTT_MBOX_HOOK_PATCH.
PR: ports/47437 Submitted by: maintainer
-rw-r--r--mail/mutt-devel/Makefile10
-rw-r--r--mail/mutt-devel/distinfo1
-rw-r--r--mail/mutt-devel/files/extra-patch-pgp-dw215
3 files changed, 120 insertions, 106 deletions
diff --git a/mail/mutt-devel/Makefile b/mail/mutt-devel/Makefile
index 3e3f2be5e7a7..957b25aa4647 100644
--- a/mail/mutt-devel/Makefile
+++ b/mail/mutt-devel/Makefile
@@ -178,10 +178,9 @@ USE_OPENSSL= yes
LIB_DEPENDS+= sasl.8:${PORTSDIR}/security/cyrus-sasl
.endif
.if defined(WITH_MUTT_PGP_PATCH)
-.error The WITH_MUTT_PGP_PATCH option is currently not available
-#SGML_NEEDED= yes
-#pre-configure::
-# ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-pgp-dw
+SGML_NEEDED= yes
+pre-configure::
+ ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-pgp-dw
.endif
.if defined(WITHOUT_MUTT_SMIME_OUTLOOK_COMPAT)
pre-configure::
@@ -234,8 +233,7 @@ PATCHFILES+= patch-${PATCH_VERSION}.cd.ifdef.1:cd
SGML_NEEDED= yes
.endif
.if defined(WITH_MUTT_MBOX_HOOK_PATCH)
-.error The WITH_MUTT_MBOX_HOOK_PATCH option is currently not available
-#PATCHFILES+= patch-${PATCH_VERSION}.dw.mbox-hook.1:dw
+PATCHFILES+= p0-patch-${PATCH_VERSION}.dw.mbox-hook.1:dw
.endif
WRKSRC= ${WRKDIR}/${DISTNAME:S/i$//}
diff --git a/mail/mutt-devel/distinfo b/mail/mutt-devel/distinfo
index 1666cdbbacd1..456a578c3b82 100644
--- a/mail/mutt-devel/distinfo
+++ b/mail/mutt-devel/distinfo
@@ -6,3 +6,4 @@ MD5 (mutt/patch-1.5.3.vvv.quote.gz) = dc24cc5765dfbbf98a9c2027d950c07a
MD5 (mutt/patch-1.5.3.cd.edit_threads.9.3) = 753a19d8efdece04cd521c3a3079dc9f
MD5 (mutt/patch-1.5.3.cd.signatures_menu.2.1) = 6db636f0004e73ee2d9f577acd4ed380
MD5 (mutt/patch-1.5.3.cd.ifdef.1) = 01b47e075364834b82da053cac4eb69f
+MD5 (mutt/p0-patch-1.5.3.dw.mbox-hook.1) = e7a0a57023cfdfd909f6040e632fff1f
diff --git a/mail/mutt-devel/files/extra-patch-pgp-dw b/mail/mutt-devel/files/extra-patch-pgp-dw
index a48c16b65b86..854fcdda626b 100644
--- a/mail/mutt-devel/files/extra-patch-pgp-dw
+++ b/mail/mutt-devel/files/extra-patch-pgp-dw
@@ -1,23 +1,48 @@
-Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
---- PATCHES 24 Jan 2002 12:10:47 -0000 3.0
-+++ PATCHES 31 Aug 2002 22:01:56 -0000
-@@ -0,0 +1 @@
-+patch-1.5.1.dw.pgp-hook.3
---- hook.c 5 Feb 2002 21:30:31 -0000 3.3
-+++ hook.c 31 Aug 2002 22:01:56 -0000
-@@ -118,7 +118,11 @@ int mutt_parse_hook (BUFFER *buf, BUFFER
+Base: http://home.woolridge.ca/mutt/patches/patch-1.5.3.dw.confirm-crypt-hook.1
+ http://home.woolridge.ca/mutt/patches/patch-1.5.3.dw.multiple-crypt-hook.1
+ http://home.woolridge.ca/mutt/patches/patch-1.5.3.dw.crypt-autoselectkey.1
+
+--- PATCHES Tue Dec 17 10:47:20 2002
++++ PATCHES Fri Jan 24 11:27:21 2003
+@@ -0,0 +1,3 @@
++patch-1.5.3.dw.crypt-autoselectkey.1
++patch-1.5.3.dw.confirm-crypt-hook.1
++patch-1.5.3.dw.multiple-crypt-hook.1
+--- doc/manual.sgml.head Tue Dec 17 10:36:42 2002
++++ doc/manual.sgml.head Fri Jan 24 11:26:59 2003
+@@ -1423,7 +1423,9 @@
+ or because, for some reasons, you need to override the key Mutt would
+ normally use. The crypt-hook command provides a method by which you can
+ specify the ID of the public key to be used when encrypting messages to
+-a certain recipient.
++a certain recipient. You may use multiple pgp-hook's with the same
++pattern; multiple matching pgp-hook's result in the use of multiple
++keyids for recipient.
+
+ <sect1>Adding key sequences to the keyboard buffer<label id="push">
+ <p>
+--- doc/muttrc.man.head Mon Sep 9 21:28:35 2002
++++ doc/muttrc.man.head Fri Jan 24 11:26:59 2003
+@@ -287 +287,3 @@
+-to a certain recipient.
++to a certain recipient. You may use multiple \fBpgp-hook\fPs with the
++same \fIpattern\fP; multiple matching \fBpgp-hook\fPs result in the use
++of multiple \fIkey-id\fPs for recipient.
+--- hook.c Wed Dec 11 16:13:11 2002
++++ hook.c Fri Jan 24 11:26:59 2003
+@@ -118,7 +118,11 @@
ptr->rx.not == not &&
!mutt_strcmp (pattern.data, ptr->rx.pattern))
{
+#ifdef M_CRYPTHOOK
-+ if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_CRYPTHOOK))
++ if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_REPLYHOOK | M_CRYPTHOOK))
+#else
- if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK))
-+#endif /* M_CRYPTHOOK */
+ if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_REPLYHOOK))
++#endif
{
/* these hooks allow multiple commands with the same
* pattern, so if we've already seen this pattern/command pair, just
-@@ -445,9 +449,25 @@ char *mutt_iconv_hook (const char *chs)
+@@ -445,9 +449,25 @@
}
#if defined(HAVE_PGP) || defined(HAVE_SMIME)
@@ -45,9 +70,9 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
}
#endif /* HAVE_PGP */
---- init.h 25 Apr 2002 13:26:26 -0000 3.15
-+++ init.h 31 Aug 2002 22:01:57 -0000
-@@ -1180,6 +1180,16 @@ struct option_t MuttVars[] = {
+--- init.h Mon Dec 9 19:09:21 2002
++++ init.h Fri Jan 24 11:27:21 2003
+@@ -1195,6 +1195,16 @@
#if defined(HAVE_PGP) || defined(HAVE_SMIME)
# ifdef HAVE_PGP
@@ -58,13 +83,13 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
+ ** .pp
+ ** If set, then a list of keys is not presented for selection when only
+ ** one matching key is available. This may be useful in conjunction with
-+ ** the \fIcrypt-hook\fP command (with ``$$crypt_confirmhook'' set).
++ ** the \fIcrypt-hook\fP command.
+ */
+# ifdef HAVE_PGP
{ "pgp_autosign", DT_SYN, R_NONE, UL "crypt_autosign", 0 },
# endif
{ "crypt_autosign", DT_BOOL, R_NONE, OPTCRYPTAUTOSIGN, 0 },
-@@ -1205,6 +1215,17 @@ struct option_t MuttVars[] = {
+@@ -1220,6 +1230,17 @@
** requested as well. IF ``$$smime_is_default'' is set, then
** OpenSSL is used instead to create S/MIME messages and settings can
** be overridden by use of the \fIsmime-menu\fP.
@@ -82,9 +107,9 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
*/
#ifdef HAVE_PGP
{ "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPTPGPIGNORESUB, 1},
---- mutt.h 20 Apr 2002 08:11:13 -0000 3.8
-+++ mutt.h 31 Aug 2002 22:01:58 -0000
-@@ -422,6 +422,7 @@ enum
+--- mutt.h Fri Dec 6 17:37:21 2002
++++ mutt.h Fri Jan 24 11:27:21 2003
+@@ -431,6 +431,7 @@
/* PGP options */
#if defined(HAVE_PGP) || defined(HAVE_SMIME)
@@ -92,7 +117,7 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
OPTCRYPTAUTOSIGN,
OPTCRYPTAUTOENCRYPT,
OPTCRYPTREPLYENCRYPT,
-@@ -433,6 +434,7 @@ enum
+@@ -442,6 +443,7 @@
OPTASKCERTLABEL,
OPTSDEFAULTDECRYPTKEY,
#endif
@@ -100,9 +125,9 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
#ifdef HAVE_PGP
OPTPGPIGNORESUB,
OPTPGPLONGIDS,
---- pgp.c 4 Apr 2002 06:50:12 -0000 3.13
-+++ pgp.c 31 Aug 2002 22:01:58 -0000
-@@ -1037,6 +1037,8 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS
+--- pgp.c Mon Dec 16 16:27:26 2002
++++ pgp.c Fri Jan 24 11:27:04 2003
+@@ -1051,6 +1051,8 @@
char *keyID, *keylist = NULL, *t;
size_t keylist_size = 0;
size_t keylist_used = 0;
@@ -111,7 +136,7 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
ADDRESS *tmp = NULL, *addr = NULL;
ADDRESS **last = &tmp;
ADDRESS *p, *q;
-@@ -1070,62 +1072,88 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS
+@@ -1084,70 +1086,96 @@
char buf[LONG_STRING];
q = p;
@@ -134,15 +159,21 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
+
+ if (hook)
{
-- /* check for e-mail address */
-- if ((t = strchr (keyID, '@')) &&
-- (addr = rfc822_parse_adrlist (NULL, keyID)))
+- if (is_numerical_keyid (keyID))
+ keyID = (char *)hook->data;
+ snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox);
-+ if (!option(OPTCRYPTCONFIRMHOOK) || (r = mutt_yesorno (buf, M_YES)) == M_YES)
++ if (!option(OPTCRYPTCONFIRMHOOK) || (r = mutt_yesorno (buf, M_YES)) == M_YES)
{
-- if (fqdn) rfc822_qualify (addr, fqdn);
-- q = addr;
+- if (strncmp (keyID, "0x", 2) == 0)
+- keyID += 2;
+- goto bypass_selection; /* you don't see this. */
++ if (is_numerical_keyid (keyID))
++ {
++ if (strncmp (keyID, "0x", 2) == 0)
++ keyID += 2;
++ goto bypass_selection; /* you don't see this. */
++ }
++
+ /* check for e-mail address */
+ if ((t = strchr (keyID, '@')) &&
+ (addr = rfc822_parse_adrlist (NULL, keyID)))
@@ -152,13 +183,19 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
+ }
+ else
+ k_info = pgp_getkeybystr (keyID, KEYFLAG_CANENCRYPT, PGP_PUBRING);
-+ }
+ }
+-
+- /* check for e-mail address */
+- if ((t = strchr (keyID, '@')) &&
+- (addr = rfc822_parse_adrlist (NULL, keyID)))
+ else if (r == -1)
-+ {
+ {
+- if (fqdn) rfc822_qualify (addr, fqdn);
+- q = addr;
+ /*
+ * yes, this implies that if one key fails they all do
+ */
-+ safe_free ((void **) &keylist);
++ FREE (&keylist);
+ rfc822_free_address (&tmp);
+ rfc822_free_address (&addr);
+ mutt_free_list (&hook_list);
@@ -166,15 +203,30 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
}
- else
- k_info = pgp_getkeybystr (keyID, KEYFLAG_CANENCRYPT, PGP_PUBRING);
- }
+- }
- else if (r == -1)
-+
+- {
+- FREE (&keylist);
+- rfc822_free_address (&tmp);
+- rfc822_free_address (&addr);
+- return NULL;
+ }
+- }
+-
+- if (k_info == NULL)
+- pgp_invoke_getkeys (q);
+
+- if (k_info == NULL && (k_info = pgp_getkeybyaddr (q, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
+- {
+- snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), q->mailbox);
+ if (k_info == NULL)
+ pgp_invoke_getkeys (q);
-+
+
+- if ((key = pgp_ask_for_key (buf, q->mailbox,
+- KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
+ if (k_info == NULL && (k_info = pgp_getkeybyaddr (q, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
{
-- safe_free ((void **) &keylist);
+- FREE (&keylist);
- rfc822_free_address (&tmp);
- rfc822_free_address (&addr);
- return NULL;
@@ -183,7 +235,7 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
+ if ((key = pgp_ask_for_key (buf, q->mailbox,
+ KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
+ {
-+ safe_free ((void **)&keylist);
++ FREE (&keylist);
+ rfc822_free_address (&tmp);
+ rfc822_free_address (&addr);
+ mutt_free_list (&hook_list);
@@ -191,46 +243,32 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
+ }
}
- }
+- else
+- key = k_info;
+ else
+ key = k_info;
-- if (k_info == NULL)
-- pgp_invoke_getkeys (q);
+- keyID = pgp_keyid (key);
+ keyID = pgp_keyid (key);
-+
+
+ bypass_selection:
+- keylist_size += mutt_strlen (keyID) + 4;
+- safe_realloc ((void **)&keylist, keylist_size);
+- sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "", /* __SPRINTF_CHECKED__ */
+- keyID);
+- keylist_used = mutt_strlen (keylist);
+ keylist_size += mutt_strlen (keyID) + 4;
+ safe_realloc ((void **)&keylist, keylist_size);
+ sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "", /* __SPRINTF_CHECKED__ */
+ keyID);
+ keylist_used = mutt_strlen (keylist);
-
-- if (k_info == NULL && (k_info = pgp_getkeybyaddr (q, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
-- {
-- snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), q->mailbox);
++
+ pgp_free_key (&key);
+ rfc822_free_address (&addr);
-
-- if ((key = pgp_ask_for_key (buf, q->mailbox,
-- KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
-- {
-- safe_free ((void **)&keylist);
-- rfc822_free_address (&tmp);
-- rfc822_free_address (&addr);
-- return NULL;
-- }
-- }
-- else
-- key = k_info;
++
+ if (!hook_list)
+ break;
-
-- keyID = pgp_keyid (key);
--
-- keylist_size += mutt_strlen (keyID) + 4;
-- safe_realloc ((void **)&keylist, keylist_size);
-- sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "", /* __SPRINTF_CHECKED__ */
-- keyID);
-- keylist_used = mutt_strlen (keylist);
++
+ hook = hook->next;
+ if (!hook)
+ break;
@@ -242,9 +280,10 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
}
rfc822_free_address (&tmp);
---- pgpkey.c 24 Jan 2002 12:10:51 -0000 3.0
-+++ pgpkey.c 31 Aug 2002 22:01:58 -0000
-@@ -435,6 +435,11 @@ static int pgp_id_matches_addr (ADDRESS
+diff -ru work.orig/mutt-1.5.3/pgpkey.c work/mutt-1.5.3/pgpkey.c
+--- pgpkey.c Wed Dec 11 12:20:05 2002
++++ pgpkey.c Fri Jan 24 11:27:21 2003
+@@ -435,6 +435,11 @@
return rv;
}
@@ -256,7 +295,7 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
static pgp_key_t *pgp_select_key (pgp_key_t *keys,
ADDRESS * p, const char *s)
{
-@@ -450,6 +455,7 @@ static pgp_key_t *pgp_select_key (pgp_ke
+@@ -450,6 +455,7 @@
pgp_uid_t *a;
int (*f) (const void *, const void *);
@@ -264,7 +303,7 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
int unusable = 0;
keymax = 0;
-@@ -479,6 +485,7 @@ static pgp_key_t *pgp_select_key (pgp_ke
+@@ -479,6 +485,7 @@
KeyTable[i++] = a;
}
@@ -272,7 +311,7 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
}
if (!i && unusable)
-@@ -487,6 +494,21 @@ static pgp_key_t *pgp_select_key (pgp_ke
+@@ -487,6 +494,21 @@
mutt_sleep (1);
return NULL;
}
@@ -294,7 +333,7 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
switch (PgpSortKeys & SORT_MASK)
{
-@@ -597,9 +619,7 @@ static pgp_key_t *pgp_select_key (pgp_ke
+@@ -597,9 +619,7 @@
break;
}
@@ -305,9 +344,9 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
{
char *s = "";
char buff[LONG_STRING];
---- protos.h 29 Apr 2002 17:12:00 -0000 3.7
-+++ protos.h 31 Aug 2002 22:01:59 -0000
-@@ -130,7 +130,7 @@ char *mutt_get_body_charset (char *, siz
+--- protos.h Wed Dec 11 23:31:25 2002
++++ protos.h Fri Jan 24 11:26:59 2003
+@@ -130,7 +130,7 @@
char *mutt_get_name (ADDRESS *);
char *mutt_get_parameter (const char *, PARAMETER *);
#if defined(HAVE_PGP) || defined(HAVE_SMIME)
@@ -316,27 +355,3 @@ Base: http://home.woolridge.ca/mutt/patches/patch-1.5.1.dw.pgp-hook.3
#endif /* HAVE_PGP */
char *mutt_make_date (char *, size_t);
---- doc/manual.sgml.head 25 Apr 2002 13:28:23 -0000 3.3
-+++ doc/manual.sgml.head 31 Aug 2002 22:02:00 -0000
-@@ -1388,7 +1388,9 @@ recipient's public key can't be deduced
- or because, for some reasons, you need to override the key Mutt would
- normally use. The pgp-hook command provides a method by which you can
- specify the ID of the public key to be used when encrypting messages to
--a certain recipient.
-+a certain recipient. You may use multiple pgp-hook's with the same
-+pattern; multiple matching pgp-hook's result in the use of multiple
-+keyids for recipient.
-
- <sect1>Adding key sequences to the keyboard buffer<label id="push">
- <p>
---- doc/muttrc.man.head.orig2 Mon Sep 2 17:36:11 2002
-+++ doc/muttrc.man.head Mon Sep 2 17:37:22 2002
-@@ -272,5 +272,7 @@
- The pgp-hook command provides a method by which you can
- specify the ID of the public key to be used when encrypting messages
--to a certain recipient.
-+to a certain recipient. You may use multiple \fBpgp-hook\fPs with the
-+same \fIpattern\fP; multiple matching \fBpgp-hook\fPs result in the use
-+of multiple \fIkey-id\fPs for recipient.
- .PP
- .nf