<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[138083] trunk/dports/security/gpg-agent</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/138083">138083</a></dd>
<dt>Author</dt> <dd>ionic@macports.org</dd>
<dt>Date</dt> <dd>2015-06-27 18:13:25 -0700 (Sat, 27 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>gpg-agent: update to 2.0.28. Regenerate launchd patch file.
Additionally:
- Fixes capitalization and spelling errors in the patch file.
- Enables SSH support. Needs implementation in the Portfile scheduled
for later.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportssecuritygpgagentPortfile">trunk/dports/security/gpg-agent/Portfile</a></li>
<li><a href="#trunkdportssecuritygpgagentfilespatchagent_gpgagentclaunchddiff">trunk/dports/security/gpg-agent/files/patch-agent_gpg-agent.c-launchd.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportssecuritygpgagentPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/security/gpg-agent/Portfile (138082 => 138083)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/security/gpg-agent/Portfile        2015-06-28 01:13:19 UTC (rev 138082)
+++ trunk/dports/security/gpg-agent/Portfile        2015-06-28 01:13:25 UTC (rev 138083)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx">
</span><span class="cx"> # When updating gpg-agent, update gnupg2 also if applicable.
</span><span class="cx"> name gpg-agent
</span><del>-version 2.0.27
</del><ins>+version 2.0.28
</ins><span class="cx"> revision 0
</span><span class="cx"> categories security mail
</span><span class="cx"> maintainers ionic openmaintainer
</span><span class="lines">@@ -24,8 +24,8 @@
</span><span class="cx">
</span><span class="cx"> use_bzip2 yes
</span><span class="cx">
</span><del>-checksums rmd160 52aaf841339713aef9e2e034b1e045bec31d6322 \
- sha256 57646d3e4b919fa1e5c8f1c0cf5fe1215333041c493a5ebc4b8f2978dbe930f2
</del><ins>+checksums rmd160 ba35deebf89284f5e2debc0bd82b229f594d0306 \
+ sha256 ce092ee4ab58fd19b9fb34a460c07b06c348f4360dd5dd4886d041eb521a534c
</ins><span class="cx">
</span><span class="cx"> startupitem.location \
</span><span class="cx"> LaunchAgents
</span></span></pre></div>
<a id="trunkdportssecuritygpgagentfilespatchagent_gpgagentclaunchddiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/security/gpg-agent/files/patch-agent_gpg-agent.c-launchd.diff (138082 => 138083)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/security/gpg-agent/files/patch-agent_gpg-agent.c-launchd.diff        2015-06-28 01:13:19 UTC (rev 138082)
+++ trunk/dports/security/gpg-agent/files/patch-agent_gpg-agent.c-launchd.diff        2015-06-28 01:13:25 UTC (rev 138083)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><del>---- agent/gpg-agent.c.old
-+++ agent/gpg-agent.c
</del><ins>+--- agent/gpg-agent.c.old        2015-06-27 23:15:37.000000000 +0200
++++ agent/gpg-agent.c        2015-06-28 00:02:13.000000000 +0200
</ins><span class="cx"> @@ -47,6 +47,79 @@
</span><span class="cx"> #include <unistd.h>
</span><span class="cx"> #include <signal.h>
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> oBatch,
</span><span class="cx">
</span><span class="cx"> oPinentryProgram,
</span><del>-@@ -133,6 +209,9 @@
</del><ins>+@@ -134,6 +210,9 @@
</ins><span class="cx"> { 301, NULL, 0, N_("@Options:\n ") },
</span><span class="cx">
</span><span class="cx"> { oDaemon, "daemon", 0, N_("run in daemon mode (background)") },
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> { oServer, "server", 0, N_("run in server mode (foreground)") },
</span><span class="cx"> { oVerbose, "verbose", 0, N_("verbose") },
</span><span class="cx"> { oQuiet,        "quiet", 0, N_("be somewhat more quiet") },
</span><del>-@@ -475,6 +554,19 @@
</del><ins>+@@ -478,6 +557,19 @@
</ins><span class="cx"> {
</span><span class="cx"> remove_socket (socket_name);
</span><span class="cx"> remove_socket (socket_name_ssh);
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-@@ -596,6 +688,9 @@
</del><ins>+@@ -603,6 +695,9 @@
</ins><span class="cx"> int nogreeting = 0;
</span><span class="cx"> int pipe_server = 0;
</span><span class="cx"> int is_daemon = 0;
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> int nodetach = 0;
</span><span class="cx"> int csh_style = 0;
</span><span class="cx"> char *logfile = NULL;
</span><del>-@@ -816,6 +911,9 @@
</del><ins>+@@ -823,6 +918,9 @@
</ins><span class="cx"> case oSh: csh_style = 0; break;
</span><span class="cx"> case oServer: pipe_server = 1; break;
</span><span class="cx"> case oDaemon: is_daemon = 1; break;
</span><span class="lines">@@ -140,17 +140,17 @@
</span><span class="cx">
</span><span class="cx"> case oDisplay: default_display = xstrdup (pargs.r.ret_str); break;
</span><span class="cx"> case oTTYname: default_ttyname = xstrdup (pargs.r.ret_str); break;
</span><del>-@@ -858,6 +956,19 @@
</del><ins>+@@ -865,6 +963,19 @@
</ins><span class="cx"> default : pargs.err = configfp? 1:2; break;
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> +
</span><del>-+ /* When running under launchd control, only start for real users ie UID >= 500
</del><ins>++ /* When running under launchd control, only start for real users, i.e., UID >= 500
</ins><span class="cx"> + *
</span><del>-+ * Do this check early to avoid filling logs */
</del><ins>++ * Do this check early to avoid filling logs. */
</ins><span class="cx"> +
</span><span class="cx"> +#ifdef __APPLE_LAUNCHD__
</span><del>-+ if (launchd_child && geteuid() < 500)
</del><ins>++ if (launchd_child && geteuid () < 500)
</ins><span class="cx"> + {
</span><span class="cx"> + log_error ("launchd only supported for real users - i.e., UID >= 500\n");
</span><span class="cx"> + exit (1);
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx"> if (configfp)
</span><span class="cx"> {
</span><span class="cx"> fclose( configfp );
</span><del>-@@ -983,7 +1094,11 @@
</del><ins>+@@ -992,7 +1103,11 @@
</ins><span class="cx"> /* If this has been called without any options, we merely check
</span><span class="cx"> whether an agent is already running. We do this here so that we
</span><span class="cx"> don't clobber a logfile but print it directly to stderr. */
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx"> {
</span><span class="cx"> log_set_prefix (NULL, JNLIB_LOG_WITH_PREFIX);
</span><span class="cx"> check_for_running_agent (0, 0);
</span><del>-@@ -1045,6 +1160,217 @@
</del><ins>+@@ -1054,6 +1169,217 @@
</ins><span class="cx"> agent_deinit_default_ctrl (ctrl);
</span><span class="cx"> xfree (ctrl);
</span><span class="cx"> }
</span><span class="lines">@@ -183,11 +183,11 @@
</span><span class="cx"> + pid_t pid;
</span><span class="cx"> +
</span><span class="cx"> + /* Remove the DISPLAY variable so that a pinentry does not
</span><del>-+ * default to a specific display. There is still a default
</del><ins>++ * default to a specific display. There is still a default
</ins><span class="cx"> + * display when gpg-agent was started using --display or a
</span><del>-+ * client requested this using an OPTION command. Note, that we
-+ * don't do this when running in reverse daemon mode (i.e. when
-+ * exec the program given as arguments). */
</del><ins>++ * client requested this using an OPTION command. Note, that we
++ * don't do this when running in reverse daemon mode (i.e., when
++ * execcuting the program given as arguments). */
</ins><span class="cx"> +
</span><span class="cx"> + if (!opt.keep_display && !argc)
</span><span class="cx"> + unsetenv ("DISPLAY");
</span><span class="lines">@@ -195,8 +195,8 @@
</span><span class="cx"> + fflush (NULL);
</span><span class="cx"> + pid = getpid ();
</span><span class="cx"> +
</span><del>-+ /* Disable SSH support for good. */
-+ opt.ssh_support = 0;
</del><ins>++ /* Must leave SSH support enabled - #46113. */
++ /* opt.ssh_support = 0; */
</ins><span class="cx"> +
</span><span class="cx"> + /* Quick-check to see if SSH support was requested but another application is
</span><span class="cx"> + * providing an SSH auth socket via launchd. */
</span><span class="lines">@@ -204,8 +204,8 @@
</span><span class="cx"> + REMOVE_ENV_VAR_FROM_LAUNCHD (GPG_ENV_SOCKET_SSH);
</span><span class="cx"> +
</span><span class="cx"> + if (getenv (GPG_ENV_SOCKET_SSH) != NULL) {
</span><del>-+ log_error ("another program is already providing SSH agent support via launchd. "
-+ "disabling SSH agent support in gpg-agent.\n");
</del><ins>++ log_error ("Another program is already providing SSH agent support via launchd. "
++ "Disabling SSH agent support in gpg-agent.\n");
</ins><span class="cx"> + opt.ssh_support = 0;
</span><span class="cx"> + }
</span><span class="cx"> + }
</span><span class="lines">@@ -248,7 +248,7 @@
</span><span class="cx"> + size_t got_sockets = launch_data_dict_get_count (socket_dict);
</span><span class="cx"> +
</span><span class="cx"> + if (got_sockets < need_sockets) {
</span><del>-+ log_error ("launchd returned less seconds than necessary. "
</del><ins>++ log_error ("launchd returned less sockets than necessary. "
</ins><span class="cx"> + "needed: %zu, given: %zu.\n", need_sockets, got_sockets);
</span><span class="cx"> + exit (1);
</span><span class="cx"> + }
</span><span class="lines">@@ -259,13 +259,13 @@
</span><span class="cx"> + /* Fetch FD array. */
</span><span class="cx"> + launch_data_t data_array_agent, data_array_ssh;
</span><span class="cx"> + if ((data_array_agent = launch_data_dict_lookup (socket_dict, GPG_SOCKET_NAME_AGENT)) == NULL) {
</span><del>-+ log_error ("no agent socket defined in launchd plist file.\n");
</del><ins>++ log_error ("No agent socket defined in launchd plist file.\n");
</ins><span class="cx"> + exit (1);
</span><span class="cx"> + }
</span><span class="cx"> +
</span><span class="cx"> + if (opt.ssh_support &&
</span><span class="cx"> + ((data_array_ssh = launch_data_dict_lookup (socket_dict, GPG_SOCKET_NAME_SSH)) == NULL)) {
</span><del>-+ log_error ("no ssh socket defined in launchd plist file.\n");
</del><ins>++ log_error ("No ssh socket defined in launchd plist file.\n");
</ins><span class="cx"> + exit (1);
</span><span class="cx"> + }
</span><span class="cx"> +
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx"> + if ((fd_count_agent = launch_data_array_get_count (data_array_agent)) > 1)
</span><span class="cx"> + log_info ("launchd returned more than one file descriptor for the agent socket - ignoring extraneous ones.\n");
</span><span class="cx"> + else if (fd_count_agent == 0) {
</span><del>-+ log_error ("no file descriptor returned for the agent socket.\n");
</del><ins>++ log_error ("No file descriptor returned for the agent socket.\n");
</ins><span class="cx"> + exit (1);
</span><span class="cx"> + }
</span><span class="cx"> + else {
</span><span class="lines">@@ -282,9 +282,9 @@
</span><span class="cx"> + }
</span><span class="cx"> +
</span><span class="cx"> + if (opt.ssh_support && ((fd_count_ssh = launch_data_array_get_count (data_array_ssh)) > 1))
</span><del>-+ log_info ("launchd returned more than one file descriptor for the ssh socket - ignoring extraneous ones.\n");
</del><ins>++ log_info ("launchd returned more than one file descriptor for the SSH socket - ignoring extraneous ones.\n");
</ins><span class="cx"> + else if (opt.ssh_support && (fd_count_ssh == 0)) {
</span><del>-+ log_error ("no file descriptor returned for the ssh socket.\n");
</del><ins>++ log_error ("No file descriptor returned for the SSH socket.\n");
</ins><span class="cx"> + exit (1);
</span><span class="cx"> + }
</span><span class="cx"> + else if (opt.ssh_support) {
</span><span class="lines">@@ -295,13 +295,13 @@
</span><span class="cx"> +
</span><span class="cx"> + char *gpg_socket = getenv (GPG_ENV_SOCKET_AGENT);
</span><span class="cx"> + if (!gpg_socket) {
</span><del>-+ log_error ("no agent socket environment variable defined by launchd.\n");
</del><ins>++ log_error ("No agent socket environment variable defined by launchd.\n");
</ins><span class="cx"> + exit (1);
</span><span class="cx"> + }
</span><span class="cx"> +
</span><span class="cx"> + char *ssh_socket = getenv (GPG_ENV_SOCKET_SSH);
</span><span class="cx"> + if (opt.ssh_support && !ssh_socket) {
</span><del>-+ log_error ("no ssh socket environment variable defined by launchd.\n");
</del><ins>++ log_error ("No SSH socket environment variable defined by launchd.\n");
</ins><span class="cx"> + exit (1);
</span><span class="cx"> + }
</span><span class="cx"> +
</span></span></pre>
</div>
</div>
</body>
</html>