[128053] trunk/dports/mail/gnupg2

ionic at macports.org ionic at macports.org
Tue Nov 11 18:40:23 PST 2014


Revision: 128053
          https://trac.macports.org/changeset/128053
Author:   ionic at macports.org
Date:     2014-11-11 18:40:23 -0800 (Tue, 11 Nov 2014)
Log Message:
-----------
gnupg2: apply patch to support gpg-agent started via launchd. #43584

Modified Paths:
--------------
    trunk/dports/mail/gnupg2/Portfile

Added Paths:
-----------
    trunk/dports/mail/gnupg2/files/patch-gpg_agent-launchd.diff

Modified: trunk/dports/mail/gnupg2/Portfile
===================================================================
--- trunk/dports/mail/gnupg2/Portfile	2014-11-12 02:40:18 UTC (rev 128052)
+++ trunk/dports/mail/gnupg2/Portfile	2014-11-12 02:40:23 UTC (rev 128053)
@@ -6,6 +6,7 @@
 # When updating gnupg2, update gpg-agent also if applicable.
 name                gnupg2
 version             2.0.26
+revision            1
 categories          mail security
 maintainers         ionic openmaintainer
 license             GPL-3+
@@ -57,6 +58,10 @@
                     patch-configure.diff \
                     patch-tests__openpgp__Makefile.in.diff
 
+platform darwin {
+    patchfiles-append   patch-gpg_agent-launchd.diff
+}
+
 post-patch {
     reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/common/homedir.c
 }

Added: trunk/dports/mail/gnupg2/files/patch-gpg_agent-launchd.diff
===================================================================
--- trunk/dports/mail/gnupg2/files/patch-gpg_agent-launchd.diff	                        (rev 0)
+++ trunk/dports/mail/gnupg2/files/patch-gpg_agent-launchd.diff	2014-11-12 02:40:23 UTC (rev 128053)
@@ -0,0 +1,102 @@
+--- agent/gpg-agent.c.old	2014-08-10 22:50:59.000000000 +0200
++++ agent/gpg-agent.c	2014-08-10 22:51:26.000000000 +0200
+@@ -2494,6 +2494,7 @@
+         }
+ 
+       infostr = xstrdup (infostr);
++#ifndef __APPLE__
+       if ( !(p = strchr (infostr, PATHSEP_C)) || p == infostr)
+         {
+           xfree (infostr);
+@@ -2519,6 +2520,10 @@
+             return 0; /* Okay, its running on the standard socket. */
+           return -1;
+         }
++#else
++      pid = 0;
++      prot = 1;
++#endif
+     }
+   else /* MODE != 0 */
+     {
+--- common/asshelp.c.old	2014-08-10 22:50:59.000000000 +0200
++++ common/asshelp.c	2014-08-10 22:51:26.000000000 +0200
+@@ -398,6 +398,7 @@
+       int pid;
+ 
+       infostr = xstrdup (infostr);
++#ifndef __APPLE__
+       if ( !(p = strchr (infostr, PATHSEP_C)) || p == infostr)
+         {
+           log_error (_("malformed GPG_AGENT_INFO environment variable\n"));
+@@ -418,6 +419,10 @@
+           force_pipe_server = 1;
+           goto restart;
+         }
++#else
++      pid = 0;
++      prot = 1;
++#endif
+ 
+       err = assuan_socket_connect (ctx, infostr, pid, 0);
+       xfree (infostr);
+--- common/simple-pwquery.c.old	2014-08-10 22:50:59.000000000 +0200
++++ common/simple-pwquery.c	2014-08-10 22:51:26.000000000 +0200
+@@ -345,6 +345,7 @@
+   strcpy (p, infostr);
+   infostr = p;
+ 
++#ifndef __APPLE__
+   if ( !(p = strchr ( infostr, PATHSEP_C)) || p == infostr
+        || (p-infostr)+1 >= sizeof client_addr.sun_path ) 
+     {
+@@ -358,6 +359,9 @@
+   while (*p && *p != PATHSEP_C)
+     p++;
+   prot = *p? atoi (p+1) : 0;
++#else
++  prot = 1;
++#endif
+   if ( prot != 1)
+     {
+ #ifdef SPWQ_USE_LOGGING
+--- tools/gpg-connect-agent.c.old	2014-08-10 22:50:59.000000000 +0200
++++ tools/gpg-connect-agent.c	2014-08-10 22:51:26.000000000 +0200
+@@ -2163,6 +2163,7 @@
+       int pid;
+ 
+       infostr = xstrdup (infostr);
++#ifndef __APPLE__
+       if ( !(p = strchr (infostr, PATHSEP_C)) || p == infostr)
+         {
+           log_error (_("malformed GPG_AGENT_INFO environment variable\n"));
+@@ -2174,6 +2175,11 @@
+       while (*p && *p != PATHSEP_C)
+         p++;
+       prot = *p? atoi (p+1) : 0;
++#else
++      // Currently unused by assuan.
++      pid = 0;
++      prot = 1;
++#endif
+       if (prot != 1)
+         {
+           log_error (_("gpg-agent protocol version %d is not supported\n"),
+--- tools/gpgconf.c.old	2014-08-10 22:50:59.000000000 +0200
++++ tools/gpgconf.c	2014-08-10 22:51:26.000000000 +0200
+@@ -317,6 +317,7 @@
+             char *tmp;
+ 
+             infostr = xstrdup (infostr);
++#ifndef __APPLE__
+             tmp = strchr (infostr, PATHSEP_C);
+             if (!tmp || tmp == infostr)
+               {
+@@ -325,6 +326,7 @@
+               }
+             else
+               *tmp = 0;
++#endif
+           }
+         fprintf (outfp, "agent-socket:%s\n",
+                  infostr? gc_percent_escape (infostr) : "");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141111/fd1d8112/attachment.html>


More information about the macports-changes mailing list