[138083] trunk/dports/security/gpg-agent
ionic at macports.org
ionic at macports.org
Sat Jun 27 18:13:25 PDT 2015
Revision: 138083
https://trac.macports.org/changeset/138083
Author: ionic at macports.org
Date: 2015-06-27 18:13:25 -0700 (Sat, 27 Jun 2015)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/dports/security/gpg-agent/Portfile
trunk/dports/security/gpg-agent/files/patch-agent_gpg-agent.c-launchd.diff
Modified: trunk/dports/security/gpg-agent/Portfile
===================================================================
--- 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)
@@ -5,7 +5,7 @@
# When updating gpg-agent, update gnupg2 also if applicable.
name gpg-agent
-version 2.0.27
+version 2.0.28
revision 0
categories security mail
maintainers ionic openmaintainer
@@ -24,8 +24,8 @@
use_bzip2 yes
-checksums rmd160 52aaf841339713aef9e2e034b1e045bec31d6322 \
- sha256 57646d3e4b919fa1e5c8f1c0cf5fe1215333041c493a5ebc4b8f2978dbe930f2
+checksums rmd160 ba35deebf89284f5e2debc0bd82b229f594d0306 \
+ sha256 ce092ee4ab58fd19b9fb34a460c07b06c348f4360dd5dd4886d041eb521a534c
startupitem.location \
LaunchAgents
Modified: trunk/dports/security/gpg-agent/files/patch-agent_gpg-agent.c-launchd.diff
===================================================================
--- 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)
@@ -1,5 +1,5 @@
---- agent/gpg-agent.c.old
-+++ agent/gpg-agent.c
+--- 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
@@ -47,6 +47,79 @@
#include <unistd.h>
#include <signal.h>
@@ -90,7 +90,7 @@
oBatch,
oPinentryProgram,
-@@ -133,6 +209,9 @@
+@@ -134,6 +210,9 @@
{ 301, NULL, 0, N_("@Options:\n ") },
{ oDaemon, "daemon", 0, N_("run in daemon mode (background)") },
@@ -100,7 +100,7 @@
{ oServer, "server", 0, N_("run in server mode (foreground)") },
{ oVerbose, "verbose", 0, N_("verbose") },
{ oQuiet, "quiet", 0, N_("be somewhat more quiet") },
-@@ -475,6 +554,19 @@
+@@ -478,6 +557,19 @@
{
remove_socket (socket_name);
remove_socket (socket_name_ssh);
@@ -120,7 +120,7 @@
}
-@@ -596,6 +688,9 @@
+@@ -603,6 +695,9 @@
int nogreeting = 0;
int pipe_server = 0;
int is_daemon = 0;
@@ -130,7 +130,7 @@
int nodetach = 0;
int csh_style = 0;
char *logfile = NULL;
-@@ -816,6 +911,9 @@
+@@ -823,6 +918,9 @@
case oSh: csh_style = 0; break;
case oServer: pipe_server = 1; break;
case oDaemon: is_daemon = 1; break;
@@ -140,17 +140,17 @@
case oDisplay: default_display = xstrdup (pargs.r.ret_str); break;
case oTTYname: default_ttyname = xstrdup (pargs.r.ret_str); break;
-@@ -858,6 +956,19 @@
+@@ -865,6 +963,19 @@
default : pargs.err = configfp? 1:2; break;
}
}
+
-+ /* When running under launchd control, only start for real users ie UID >= 500
++ /* When running under launchd control, only start for real users, i.e., UID >= 500
+ *
-+ * Do this check early to avoid filling logs */
++ * Do this check early to avoid filling logs. */
+
+#ifdef __APPLE_LAUNCHD__
-+ if (launchd_child && geteuid() < 500)
++ if (launchd_child && geteuid () < 500)
+ {
+ log_error ("launchd only supported for real users - i.e., UID >= 500\n");
+ exit (1);
@@ -160,7 +160,7 @@
if (configfp)
{
fclose( configfp );
-@@ -983,7 +1094,11 @@
+@@ -992,7 +1103,11 @@
/* If this has been called without any options, we merely check
whether an agent is already running. We do this here so that we
don't clobber a logfile but print it directly to stderr. */
@@ -172,7 +172,7 @@
{
log_set_prefix (NULL, JNLIB_LOG_WITH_PREFIX);
check_for_running_agent (0, 0);
-@@ -1045,6 +1160,217 @@
+@@ -1054,6 +1169,217 @@
agent_deinit_default_ctrl (ctrl);
xfree (ctrl);
}
@@ -183,11 +183,11 @@
+ pid_t pid;
+
+ /* Remove the DISPLAY variable so that a pinentry does not
-+ * default to a specific display. There is still a default
++ * default to a specific display. There is still a default
+ * display when gpg-agent was started using --display or a
-+ * 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). */
++ * 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). */
+
+ if (!opt.keep_display && !argc)
+ unsetenv ("DISPLAY");
@@ -195,8 +195,8 @@
+ fflush (NULL);
+ pid = getpid ();
+
-+ /* Disable SSH support for good. */
-+ opt.ssh_support = 0;
++ /* Must leave SSH support enabled - #46113. */
++ /* opt.ssh_support = 0; */
+
+ /* Quick-check to see if SSH support was requested but another application is
+ * providing an SSH auth socket via launchd. */
@@ -204,8 +204,8 @@
+ REMOVE_ENV_VAR_FROM_LAUNCHD (GPG_ENV_SOCKET_SSH);
+
+ if (getenv (GPG_ENV_SOCKET_SSH) != NULL) {
-+ log_error ("another program is already providing SSH agent support via launchd. "
-+ "disabling SSH agent support in gpg-agent.\n");
++ log_error ("Another program is already providing SSH agent support via launchd. "
++ "Disabling SSH agent support in gpg-agent.\n");
+ opt.ssh_support = 0;
+ }
+ }
@@ -248,7 +248,7 @@
+ size_t got_sockets = launch_data_dict_get_count (socket_dict);
+
+ if (got_sockets < need_sockets) {
-+ log_error ("launchd returned less seconds than necessary. "
++ log_error ("launchd returned less sockets than necessary. "
+ "needed: %zu, given: %zu.\n", need_sockets, got_sockets);
+ exit (1);
+ }
@@ -259,13 +259,13 @@
+ /* Fetch FD array. */
+ launch_data_t data_array_agent, data_array_ssh;
+ if ((data_array_agent = launch_data_dict_lookup (socket_dict, GPG_SOCKET_NAME_AGENT)) == NULL) {
-+ log_error ("no agent socket defined in launchd plist file.\n");
++ log_error ("No agent socket defined in launchd plist file.\n");
+ exit (1);
+ }
+
+ if (opt.ssh_support &&
+ ((data_array_ssh = launch_data_dict_lookup (socket_dict, GPG_SOCKET_NAME_SSH)) == NULL)) {
-+ log_error ("no ssh socket defined in launchd plist file.\n");
++ log_error ("No ssh socket defined in launchd plist file.\n");
+ exit (1);
+ }
+
@@ -273,7 +273,7 @@
+ if ((fd_count_agent = launch_data_array_get_count (data_array_agent)) > 1)
+ log_info ("launchd returned more than one file descriptor for the agent socket - ignoring extraneous ones.\n");
+ else if (fd_count_agent == 0) {
-+ log_error ("no file descriptor returned for the agent socket.\n");
++ log_error ("No file descriptor returned for the agent socket.\n");
+ exit (1);
+ }
+ else {
@@ -282,9 +282,9 @@
+ }
+
+ if (opt.ssh_support && ((fd_count_ssh = launch_data_array_get_count (data_array_ssh)) > 1))
-+ log_info ("launchd returned more than one file descriptor for the ssh socket - ignoring extraneous ones.\n");
++ log_info ("launchd returned more than one file descriptor for the SSH socket - ignoring extraneous ones.\n");
+ else if (opt.ssh_support && (fd_count_ssh == 0)) {
-+ log_error ("no file descriptor returned for the ssh socket.\n");
++ log_error ("No file descriptor returned for the SSH socket.\n");
+ exit (1);
+ }
+ else if (opt.ssh_support) {
@@ -295,13 +295,13 @@
+
+ char *gpg_socket = getenv (GPG_ENV_SOCKET_AGENT);
+ if (!gpg_socket) {
-+ log_error ("no agent socket environment variable defined by launchd.\n");
++ log_error ("No agent socket environment variable defined by launchd.\n");
+ exit (1);
+ }
+
+ char *ssh_socket = getenv (GPG_ENV_SOCKET_SSH);
+ if (opt.ssh_support && !ssh_socket) {
-+ log_error ("no ssh socket environment variable defined by launchd.\n");
++ log_error ("No SSH socket environment variable defined by launchd.\n");
+ exit (1);
+ }
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150627/acccd91e/attachment-0001.html>
More information about the macports-changes
mailing list