[git] GnuPG - branch, master, updated. gnupg-2.1.0-beta834-13-g20c6da5
by Werner Koch
cvs at cvs.gnupg.org
Thu Sep 25 22:14:47 CEST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via 20c6da50d4f6264d26d113d7de606971f719a0ca (commit)
via 371c2b14b0347209efd23b4e54e1981a12d7aeab (commit)
from 26592fbef392469d60a49b8c29db8c0fb074ff78 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 20c6da50d4f6264d26d113d7de606971f719a0ca
Author: Werner Koch <wk at gnupg.org>
Date: Thu Sep 25 22:13:03 2014 +0200
gpg: Do not always print dashes in obsolete_option.
* g10/gpg.c (main): Pass option names to obsolete_option without
double dash.
* g10/misc.c (obsolete_option, obsolete_scdaemon_option): Print double
dash only for command line options.
diff --git a/g10/gpg.c b/g10/gpg.c
index 4bb8ef6..95a78d5 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -531,10 +531,6 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oDryRun, "dry-run", N_("do not make any changes")),
ARGPARSE_s_n (oInteractive, "interactive", N_("prompt before overwriting")),
- ARGPARSE_s_n (oUseAgent, "use-agent", "@"),
- ARGPARSE_s_n (oNoUseAgent, "no-use-agent", "@"),
- ARGPARSE_s_s (oGpgAgentInfo, "gpg-agent-info", "@"),
-
ARGPARSE_s_n (oBatch, "batch", "@"),
ARGPARSE_s_n (oAnswerYes, "yes", "@"),
ARGPARSE_s_n (oAnswerNo, "no", "@"),
@@ -793,6 +789,9 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oNoAutoKeyLocate, "no-auto-key-locate", "@"),
/* Dummy options with warnings. */
+ ARGPARSE_s_n (oUseAgent, "use-agent", "@"),
+ ARGPARSE_s_n (oNoUseAgent, "no-use-agent", "@"),
+ ARGPARSE_s_s (oGpgAgentInfo, "gpg-agent-info", "@"),
ARGPARSE_s_s (oReaderPort, "reader-port", "@"),
ARGPARSE_s_s (octapiDriver, "ctapi-driver", "@"),
ARGPARSE_s_s (opcscDriver, "pcsc-driver", "@"),
@@ -2354,28 +2353,24 @@ main (int argc, char **argv)
case oUseAgent: /* Dummy. */
break;
+
case oNoUseAgent:
- obsolete_option (configname, configlineno, "--no-use-agent");
+ obsolete_option (configname, configlineno, "no-use-agent");
break;
case oGpgAgentInfo:
- obsolete_option (configname, configlineno, "--gpg-agent-info");
+ obsolete_option (configname, configlineno, "gpg-agent-info");
break;
-
case oReaderPort:
- obsolete_scdaemon_option (configname, configlineno,
- "--reader-port");
+ obsolete_scdaemon_option (configname, configlineno, "reader-port");
break;
case octapiDriver:
- obsolete_scdaemon_option (configname, configlineno,
- "--ctapi-driver");
+ obsolete_scdaemon_option (configname, configlineno, "ctapi-driver");
break;
case opcscDriver:
- obsolete_scdaemon_option (configname, configlineno,
- "--pcsc-driver");
+ obsolete_scdaemon_option (configname, configlineno, "pcsc-driver");
break;
case oDisableCCID:
- obsolete_scdaemon_option (configname, configlineno,
- "--disable-ccid");
+ obsolete_scdaemon_option (configname, configlineno, "disable-ccid");
break;
case oAnswerYes: opt.answer_yes = 1; break;
diff --git a/g10/misc.c b/g10/misc.c
index fa04387..76faa49 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -1038,8 +1038,8 @@ obsolete_option (const char *configname, unsigned int configlineno,
log_info (_("%s:%u: obsolete option \"%s\" - it has no effect\n"),
configname, configlineno, name);
else
- log_info (_("WARNING: \"%s\" is an obsolete option - it has no effect\n"),
- name);
+ log_info (_("WARNING: \"%s%s\" is an obsolete option - it has no effect\n"),
+ "--", name);
}
@@ -1052,8 +1052,9 @@ obsolete_scdaemon_option (const char *configname, unsigned int configlineno,
" - it only has effect in %s\n"),
configname, configlineno, name, SCDAEMON_NAME EXTSEP_S "conf");
else
- log_info (_("WARNING: \"%s\" is an obsolete option"
- " - it has no effect except on %s\n"), name, SCDAEMON_NAME);
+ log_info (_("WARNING: \"%s%s\" is an obsolete option"
+ " - it has no effect except on %s\n"),
+ "--", name, SCDAEMON_NAME);
}
commit 371c2b14b0347209efd23b4e54e1981a12d7aeab
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Thu Sep 25 14:45:37 2014 -0400
gpg: Warn about (but don't fail) on scdaemon options in gpg.conf.
* g10/gpg.c: Add config options that should belong in scdaemon.conf
* g10/main.h, g10/misc.c (obsolete_scdaemon_option): New.
--
In gpg2, the following options are only relevant for scdaemon:
reader-port
ctapi-driver
pcsc-driver
disable-ccid
but in gpg1, they are options for gpg itself.
Some users of gpg1 might have these options in their
~/.gnupg/gpg.conf, which causes gpg2 to fail hard if it reads that
config file.
gpg2 should not fail hard, though giving a warning (and suggesting a
move to scdaemon.conf) seems OK.
This patch does *not* reintroduce any documentation for these options
in gpg.texi, even to indicate that they are "dummy" options, since
scdaemon.texi contains the appropriate documentation.
Debian-bug-id: 762844
- Program names factored out from obsolete_scdaemon_option to make
reuse without new translations easier. -wk
diff --git a/g10/gpg.c b/g10/gpg.c
index a9d248d..4bb8ef6 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -366,6 +366,10 @@ enum cmd_and_opt_values
oKeyidFormat,
oExitOnStatusWriteError,
oLimitCardInsertTries,
+ oReaderPort,
+ octapiDriver,
+ opcscDriver,
+ oDisableCCID,
oRequireCrossCert,
oNoRequireCrossCert,
oAutoKeyLocate,
@@ -788,6 +792,12 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_s (oAutoKeyLocate, "auto-key-locate", "@"),
ARGPARSE_s_n (oNoAutoKeyLocate, "no-auto-key-locate", "@"),
+ /* Dummy options with warnings. */
+ ARGPARSE_s_s (oReaderPort, "reader-port", "@"),
+ ARGPARSE_s_s (octapiDriver, "ctapi-driver", "@"),
+ ARGPARSE_s_s (opcscDriver, "pcsc-driver", "@"),
+ ARGPARSE_s_n (oDisableCCID, "disable-ccid", "@"),
+
/* Dummy options. */
ARGPARSE_s_n (oNoop, "sk-comments", "@"),
ARGPARSE_s_n (oNoop, "no-sk-comments", "@"),
@@ -2351,6 +2361,23 @@ main (int argc, char **argv)
obsolete_option (configname, configlineno, "--gpg-agent-info");
break;
+ case oReaderPort:
+ obsolete_scdaemon_option (configname, configlineno,
+ "--reader-port");
+ break;
+ case octapiDriver:
+ obsolete_scdaemon_option (configname, configlineno,
+ "--ctapi-driver");
+ break;
+ case opcscDriver:
+ obsolete_scdaemon_option (configname, configlineno,
+ "--pcsc-driver");
+ break;
+ case oDisableCCID:
+ obsolete_scdaemon_option (configname, configlineno,
+ "--disable-ccid");
+ break;
+
case oAnswerYes: opt.answer_yes = 1; break;
case oAnswerNo: opt.answer_no = 1; break;
case oKeyring: append_to_strlist( &nrings, pargs.r.ret_str); break;
diff --git a/g10/main.h b/g10/main.h
index 44c4478..ad528b4 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -136,6 +136,8 @@ void deprecated_warning(const char *configname,unsigned int configlineno,
void deprecated_command (const char *name);
void obsolete_option (const char *configname, unsigned int configlineno,
const char *name);
+void obsolete_scdaemon_option (const char *configname,
+ unsigned int configlineno, const char *name);
int string_to_cipher_algo (const char *string);
int string_to_digest_algo (const char *string);
diff --git a/g10/misc.c b/g10/misc.c
index 54c2f89..fa04387 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -1043,6 +1043,20 @@ obsolete_option (const char *configname, unsigned int configlineno,
}
+void
+obsolete_scdaemon_option (const char *configname, unsigned int configlineno,
+ const char *name)
+{
+ if (configname)
+ log_info (_("%s:%u: \"%s\" is obsolete in this file"
+ " - it only has effect in %s\n"),
+ configname, configlineno, name, SCDAEMON_NAME EXTSEP_S "conf");
+ else
+ log_info (_("WARNING: \"%s\" is an obsolete option"
+ " - it has no effect except on %s\n"), name, SCDAEMON_NAME);
+}
+
+
/*
* Wrapper around gcry_cipher_map_name to provide a fallback using the
* "Sn" syntax as used by the preference strings.
-----------------------------------------------------------------------
Summary of changes:
g10/gpg.c | 34 ++++++++++++++++++++++++++++------
g10/main.h | 2 ++
g10/misc.c | 19 +++++++++++++++++--
3 files changed, 47 insertions(+), 8 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list