Replace npth_yield in busy wait by npth_usleep.

* dirmngr/ldap-wrapper.c (ldap_wrapper_wait_connections): Call
npth_usleep instead of npth_yield.
Add mksamplekeys script.

* doc/mksamplekeys: New.
--
Note that we have the same script in the 1.4 branch.  That should be
removed and only this one shall be used.
Typo fixes in de.po.

--
This is bug#1276 and http://bugs.debian.org/594343
Allow compress algorithm 0.

* g10/mainproc.c (proc_compressed): Remove superfluous check for
compress algorithm 0.  Reported by pfandrade.  This is bug#1326.
Update the maintenance instructions.

--
Print warning for arguments not considered an option.

GnuPG requires that options are given before other arguments.  This
can sometimes be confusing.  We now print a warning if we found an
argument looking alike a long option without being preceded by the
stop option.  This is bug#1343.

* common/argparse.h (ARGPARSE_FLAG_STOP_SEEN): New.
* common/argparse.c (arg_parse): Set new flag.
* g10/gpg.c (main): Print the warning.
* agent/gpg-agent.c (main): Ditto.
* dirmngr/dirmngr.c (main): Ditto.
* g13/g13.c (main): Ditto.
* scd/scdaemon.c (main): Ditto.
* sm/gpgsm.c (main): Ditto.
* tools/gpg-connect-agent.c (main): Ditto.
* tools/gpgconf.c (main): Ditto.
Fix timegm regression test.

* common/t-timestuff.c (test_timegm): Change test to use January and
not February or December+1.  Bug spotted by Daniel Kahn Gillmor.
Document CLEAR_PASSPHRASE.

And describe the --mode=normal option.
Document PRESET_PASSPHRASE.
Document GENKEY options.
Document PASSWD --preset.
Mention status messages in the documentation.

Note INQUIRE_MAXLEN.
Do not mix test result with progress lines.

This makes parsing of the results easier.  Fixes bug#1400.

* tests/openpgp/defs.inc (progress_cancel, progress_end)
(progress_new): New.
* tests/openpgp/conventional-mdc.test: Use progress functions
* tests/openpgp/conventional.test: Ditto.
* tests/openpgp/encrypt-dsa.test: Ditto.
* tests/openpgp/encrypt.test: Ditto.
* tests/openpgp/sigs.test: Ditto.
--
The new output style is now:

      > MD5 SHA1 RIPEMD160 SHA256 SHA384 SHA512 SHA224 <
  PASS: sigs.test

or if the test fails:

      > MD5 SHA1
  sigs.test: ooops
  FAIL: sigs.test
Fix killing PID -1.

When the KILLSCD command had been sent a race condition would occur
causing PID -1 getting killed, which on Linux seems to terminate all
applications for the current user.
faq: Replace --list-ownerturst by --export-ownertrust.

--
Change license for some files in common to LGPLv3+/GPLv2+.

Having the LGPL on the common GnuPG code helps to share code
between GnuPG and related projects (like GPGME and Libassuan).  This
is good for interoperability and to reduces bugs.

* common/asshelp.c, common/asshelp.h, common/asshelp2.c, common/b64dec.c
* common/b64enc.c, common/convert.c, common/dns-cert.c
* common/dns-cert.h common/exechelp-posix.c, common/exechelp-w32.c
* common/exechelp-w32ce.c, common/exechelp.h, common/get-passphrase.c
* common/get-passphrase.h, common/gettime.c, common/gpgrlhelp.c
* common/helpfile.c, common/homedir.c, common/http.c, common/http.h
* common/i18n.c, common/init.c, common/init.h, common/iobuf.c
* common/iobuf.h, common/localename.c, common/membuf.c, common/membuf.h
* common/miscellaneous.c, common/openpgp-oid.c, common/openpgpdefs.h
* common/percent.c, common/pka.c, common/pka.h, common/session-env.c
* common/session-env.h, common/sexp-parse.h, common/sexputil.c
* common/signal.c, common/srv.c, common/srv.h, common/ssh-utils.c
* common/ssh-utils.h, common/sysutils.c, common/sysutils.h
* common/tlv.c, common/tlv.h, common/ttyio.c, common/ttyio.h
* common/userids.c, common/userids.h, common/xasprintf.c: Change
license to LGPLv3+/GPLv2+/
remove doubled words in a comment
avoid buffer strncpy-induced buffer overrun

* dirmngr/crlcache.c (open_dir): Ensure that both this_update
and next_update member strings are NUL-terminated.
make DNS and URI fields work in gpgsm --gen-key.

* sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Actually set mb_uri and
mb_dns.avoid buffer strncpy-induced buffer overrun
agent: Fix deadlock in trustlist due to the switch to npth.

* agent/trustlist.c (clear_trusttable): New.
(agent_reload_trustlist): Use new function.
(read_trustfiles): Require to be called with lock held.
(agent_istrusted): Factor all code out to ...
(istrusted_internal): new.  Add ALREADY_LOCKED arg.  Make sure the
table islocked.  Do not print TRUSTLISTFLAG stati if called internally.
(agent_marktrusted): Replace calls to agent_reload_trustlist by
explicit code.
--

In contrast to pth, npth does not use recursive mutexes by default.
However, the code in trustlist.c assumed recursive locks and thus we
had to rework it.