mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
451cd1b392
* common/gc-opt-flags.h (GC_OPT_FLAG_RUNTIME): Move to ... * tools/gpgconf-comp.c: here. (known_options_scdaemon): Remove "options". (known_options_dirmngr): Remove "options". (known_options_gpgsm): Remove "options". (known_options_gpg): Remove "options" and "keyserver". (struct gc_option_s): Rename active t gpgconf_list. (gc_component_list_options): Do not act upon active. (option_check_validity): Ditto. (is_known_option): Make it work correctly for unknown options. (retrieve_options_from_program): Use renamed flag gpgconf_list only to detect duplicated items from --gpgconf-list. Do not set runtime. Only e set the options if set by --gpgconf-list; never clear them. * agent/gpg-agent.c: Simplify the --gpgconf-list output. * dirmngr/dirmngr.c: Ditto. * g10/gpg.c: Ditto. * kbx/keyboxd.c: Ditto. * scd/scdaemon.c: Ditto. * sm/gpgsm.c: Ditto. * tests/openpgp/gpgconf.scm: Use "compliance" instead of "keyserver" for the string arg test. -- There is no need to read the list of options from the components unless they convey a default value. It is better to consult only the list we have in gpgconf-comp.c to decide on whether an option should be displayed. Right, this might mess up thing if a newer gpgconf version is used with an older component, but we already print warnings in this case and in general we do not want to support this anymore - the times of gpg 1.4. and 2.0 are long over now. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <wk@gnupg.org>
============ GPG Conf ============ Main documentation for this tool can be found in doc/tools.texi. BACKENDS ======== Backends should support the following commands: Command --gpgconf-list ---------------------- List the location of the configuration file, and all default values of all options. The location of the configuration file must be an absolute pathname. The format of each line is: NAME:FLAGS:DEFAULT:ARGDEF NAME This field contains a name tag for the group or option. The name tag is used to specify the group or option in all communication with GPGConf. The name tag is to be used verbatim. It is not in any escaped format. FLAGS The flags field contains an unsigned number. Its value is the OR-wise combination of the following flag values: 16 default If this flag is set, a default value is available. 32 default desc If this flag is set, a (runtime) default is available. This and the "default" flag are mutually exclusive. 64 no arg desc If this flag is set, and the "optional arg" flag is set, then the option has a special meaning if no argument is given. DEFAULT This field is defined only for options. Its format is that of an option argument (see section Format Conventions for details). If the default value is empty, then no default is known. Otherwise, the value specifies the default value for this option. Note that this field is also meaningful if the option itself does not take a real argument. ARGDEF This field is defined only for options for which the "optional arg" flag is set. If the "no arg desc" flag is not set, its format is that of an option argument (see section Format Conventions for details). If the default value is empty, then no default is known. Otherwise, the value specifies the default value for this option. If the "no arg desc" flag is set, the field is either empty or contains a description of the effect of this option if no argument is given. Note that this field is also meaningful if the option itself does not take a real argument. Example: $ dirmngr --gpgconf-list gpgconf-config-file:/mnt/marcus/.gnupg/dirmngr.conf ldapservers-file:/mnt/marcus/.gnupg/dirmngr_ldapservers.conf add-servers:0 max-replies:10 TODO ---- * Implement --dry-run and --quiet. * Extend the backend interface to include gettext domain and description, if available, to avoid repeating this information in gpgconf.