libgpg-error.git
23 hours agoyat2m: Avoid compiler warnings. master
NIIBE Yutaka [Mon, 22 Oct 2018 01:28:39 +0000 (10:28 +0900)]
yat2m: Avoid compiler warnings.

* doc/yat2m.c (isodatestring): Prepare enough buffer.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
23 hours agogpg-error-config: Support "auto", architecture independent script.
NIIBE Yutaka [Mon, 22 Oct 2018 01:17:48 +0000 (10:17 +0900)]
gpg-error-config: Support "auto", architecture independent script.

* configure.ac (pkg_config_libdir): Set it "auto" when it looks
multiarch environment.
* src/gpg-error-config-new.in: Automatically detects the triplet.

--

The triplet detection mechanism is not sufficient.  It's up to
distributions to apply more changes (in distribution specific way).

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
23 hours agobuild: Update config.{guess,sub} to {2018-08-29,2018-08-29}.
NIIBE Yutaka [Mon, 22 Oct 2018 00:41:33 +0000 (09:41 +0900)]
build: Update config.{guess,sub} to {2018-08-29,2018-08-29}.

* build-aux/config.guess: Update.
* build-aux/config.sub: Update.

--

Local changes of timestamp may result merge conflict when we update
those files from upstream.  It's good to merge now than later.

Fixes-commit: e99480affa595702595e59333aca96ab28389d34
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
3 days agobuild-aux: use https instead of http
Daniel Kahn Gillmor [Thu, 18 Oct 2018 23:21:45 +0000 (19:21 -0400)]
build-aux: use https instead of http

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
5 days agogpg-error-config: Fix PKG_CONFIG_LIBDIR support.
NIIBE Yutaka [Wed, 17 Oct 2018 03:33:05 +0000 (12:33 +0900)]
gpg-error-config: Fix PKG_CONFIG_LIBDIR support.

* configure.ac (pkg_config_libdir): New.
* src/gpg-error-config-new.in: Use pkg_config_libdir.

--

PKG_CONFIG_LIBDIR is not mere libdir but should include
'pkgconfig'.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
6 days agogpg-error-config: Support PKG_CONFIG_LIBDIR.
NIIBE Yutaka [Tue, 16 Oct 2018 01:38:43 +0000 (10:38 +0900)]
gpg-error-config: Support PKG_CONFIG_LIBDIR.

* src/gpg-error-config-new.in: Use PKG_CONFIG_LIBDIR if specified.

--

This change allows a distribution (like Debian) offering
<triplet>-gpg-error-config wrapper script which invokes
gpg-error-config with host specific PKG_CONFIG_LIBDIR.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
10 days agosyscfg: Add support for arm64ilp32
Wookey [Fri, 12 Oct 2018 13:57:23 +0000 (09:57 -0400)]
syscfg: Add support for arm64ilp32

* src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h: New.
* src/Makefile.am (lock_obj_pub): Add it.

--

Debian-bug-id: 869605
Co-authored-by: Wookey <wookey@debian.org>
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
12 days agogpg-error-config: Fix the place of *.pc (for multilib).
NIIBE Yutaka [Wed, 10 Oct 2018 01:32:18 +0000 (10:32 +0900)]
gpg-error-config: Fix the place of *.pc (for multilib).

* src/Makefile.am (pkgconfigdir): It should be under libdir.
* src/gpg-error-config-new.in: Likewise.

--

Reported-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
12 days agogpg-error-config: Add PKG_CONFIG_SYSROOT_DIR support.
NIIBE Yutaka [Wed, 10 Oct 2018 01:14:26 +0000 (10:14 +0900)]
gpg-error-config: Add PKG_CONFIG_SYSROOT_DIR support.

* src/gpg-error-config-new.in (sysroot): New function.
(want_cflags, want_libs): Use sysroot.
* src/gpg-error-config-test.sh: Test with PKG_CONFIG_SYSROOT_DIR.

--

PKG_CONFIG_SYSROOT_DIR is for cross build.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
4 weeks agosyscfg: Add support for arc-unknown-linux-gnu
Werner Koch [Fri, 21 Sep 2018 12:37:21 +0000 (14:37 +0200)]
syscfg: Add support for arc-unknown-linux-gnu

* src/mkheader.c (canon_host_triplet): Add to table.
--

Note that unknown in the above triplet is actually a wildcard for 4
part triplets.

Signed-off-by: Werner Koch <wk@gnupg.org>
4 weeks agocore: Make cross building in mkheader more explicit.
Werner Koch [Fri, 21 Sep 2018 12:20:29 +0000 (14:20 +0200)]
core: Make cross building in mkheader more explicit.

* src/mkheader.c (main): Add option --cross.
(write_special): Don't use native in cross mode.
* src/Makefile.am (mkheader_opts): New.
(gpg-error.h): Add MKHEADER_OPTS.
--

The old behaviour was that an existing lock-obj-oub.native.h was
preferred over one from syscfg even in cross mode.  The Makefile tried
to get this right by deleting such a file first but when calling
mkheader manually for testing this may have not been done.  We now
allow (and also use by the Makefile) an option --cross to make this
explicit.

Signed-off-by: Werner Koch <wk@gnupg.org>
4 weeks agocore: Simplify calling convention of mkheader.
Werner Koch [Fri, 21 Sep 2018 12:02:42 +0000 (14:02 +0200)]
core: Simplify calling convention of mkheader.

* src/Makefile.am (gpg-error.h): Remove HOST_OS from mkheader call.
* src/mkheader.c (canon_host_triplet): Add return arg r_os.
(main): Remove first arg and derive host_os from host_triplet.
--

No need to let the caller pass the host_os, we can derive it from the
triplet.

Signed-off-by: Werner Koch <wk@gnupg.org>
4 weeks agosrc: Fix portability for echo.
NIIBE Yutaka [Thu, 20 Sep 2018 04:24:57 +0000 (13:24 +0900)]
src: Fix portability for echo.

* src/Makefile.am: Use ECHO_N and ECHO_C.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
4 weeks agogpg-error-config: Remove white space for the output by old.
NIIBE Yutaka [Thu, 20 Sep 2018 04:02:06 +0000 (13:02 +0900)]
gpg-error-config: Remove white space for the output by old.

* src/gpg-error-config-test.sh: Remove white spaces at the
end or at the beginning.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
4 weeks agogpg-error-config: Use expr to remove var in expression.
NIIBE Yutaka [Thu, 20 Sep 2018 03:45:36 +0000 (12:45 +0900)]
gpg-error-config: Use expr to remove var in expression.

* src/gpg-error-config-new.in (remove_var_expr): Use expr.

--

For OpenBSD's sh, it results "bad substitusion".  Now, we use expr.
Tested on OpenBSD 6.2.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
4 weeks agogpg-error-config: Fix a variable name for zsh.
NIIBE Yutaka [Thu, 20 Sep 2018 02:55:40 +0000 (11:55 +0900)]
gpg-error-config: Fix a variable name for zsh.

* src/gpg-error-config-new.in (module_list): Rename from modules.

--

For ZSH, "modules" is built-in variable name.  Avoid such a use.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
4 weeks agogpg-error-config: Don't use local variables.
NIIBE Yutaka [Thu, 20 Sep 2018 02:52:14 +0000 (11:52 +0900)]
gpg-error-config: Don't use local variables.

* src/gpg-error-config-new.in: Use global variables only.

--

Since Korn Shell requires different syntax for function to declare
local variables, and some OS use Korn Shell as /bin/sh, avoid
non-portable use of "local".

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
4 weeks agogpg-error-config: Avoid more space char.
NIIBE Yutaka [Thu, 20 Sep 2018 01:43:44 +0000 (10:43 +0900)]
gpg-error-config: Avoid more space char.

* src/gpg-error-config-new.in: Don't put more space.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
4 weeks agosrc: Fix Makefile for BSD make.
NIIBE Yutaka [Wed, 19 Sep 2018 02:14:02 +0000 (11:14 +0900)]
src: Fix Makefile for BSD make.

* src/Makefile.am (BUILT_SOURCES): Add srcdir to err-sources.h and
err-codes.h.
(CLEANFILES): Move err-sources.h and err-codes.h to...
(MAINTAINERCLEANFILES): ... this new target.
(gpg_error_LDADD): Remove ./ to generate libgpg-error.la.

--

BSD make is not kind enough to mix path and target.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
4 weeks agoAccept pkgconf difference for spaces.
NIIBE Yutaka [Wed, 19 Sep 2018 01:50:12 +0000 (10:50 +0900)]
Accept pkgconf difference for spaces.

* src/gpg-error-config-test.sh (OUTPUT_OLD): Use shell
and echo to remove spaces.

--

There is an alternative implementation of pkg-conf, named pkgconf.
It emits an extra space at the end.

Tested on FreeBSD 11.1.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
4 weeks agosyscfg: Support ARC CPUs and simplify aliasing table.
Werner Koch [Tue, 18 Sep 2018 12:54:08 +0000 (14:54 +0200)]
syscfg: Support ARC CPUs and simplify aliasing table.

* src/mkheader.c (xmalloc): New.
(xstrdup): Implement using xmalloc.
(canon_host_triplet): Add supporr for arc CPU.  Adjust alias table to
also alias *-pc-*.  Rename ibm to unknown. Add internal arg.  Add
unknown vendor hack.
(main): New mode to just print the canonicalized form.
* src/Makefile.am (lock_obj_pub): s/-(pc|ibm)-/-unknown/.  Also rename
files accordingly.
--

config.sub does no real aliasing and thus we would need to add several
vendors to the alising tables despite that this has no technical
meanding.  Instead we now replace the vendor with "unknown" for the
4-part-"triplets".  This change will make maintenace easier.

Signed-off-by: Werner Koch <wk@gnupg.org>
6 weeks agoMake gpg-error-config compatible to pkg-config.
NIIBE Yutaka [Mon, 10 Sep 2018 23:57:23 +0000 (08:57 +0900)]
Make gpg-error-config compatible to pkg-config.

* configure.ac (AC_CONFIG_FILES): Generate src/gpg-error.pc, as well
as src/gpg-error-config-old and src/gpg-error-config-new.
* src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New.
(EXTRA_DIST): Add gpg-error-config-new.in, gpg-error-config-test.sh,
and gpg-error.pc.in.
(CLEANFILES): Add gpg-error-config gpg-error-config-test.log.
(TESTS): New.
(gpg-error-config): New target.
* src/gpg-error-config-new.in: New.
* src/gpg-error-config-test.sh: New.
* src/gpg-error.pc.in: New.
* src/gpg-error.m4 (GPG_ERROR_MT_CFLAGS): Use --variable.
(GPG_ERROR_MT_LIBS, gpg_error_config_host): Likewise.

--

This change is to privide gpg-error.pc for pkg-config, so that
developers can use pkg-config to configure their applications.  The
gpg-error-config script is also kept supported for applications which
want to avoid dependency of pkg-config.

Note that new gpg-error-config script uses gpg-error.pc as master
data, so that it can keep compatibility to pkg-config easily.  In the
new gpg-error-config script, features are added to increase
compatibility to pkg-config, like --variable option and multiple
module support.  However, it is not meant to oriented to be a
full-fledged version of pkg-config, only a small set of features is
supported.

To be conservative, new gpg-error-config is checked at build time
against old gpg-error-config.  On the host which fails, old
gpg-error-config will be installed with a warning.

GnuPG-bug-id: 4085
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
6 weeks agogpgscm: Suppress warnings for GCC > 6.
NIIBE Yutaka [Thu, 6 Sep 2018 06:02:11 +0000 (15:02 +0900)]
gpgscm: Suppress warnings for GCC > 6.

* tests/gpgscm/scheme.c (CASE): Use unused attribute for GCC > 6.
(FALLTHROUGH): New for fallthrough.
(Eval_Cycle): Use FALLTHROUGH.  Remove not-needed comment of
fallthrough.

--

Since GCC combines C preprocessor macro expansion, the fallthrough
comment doesn't work well to suppress warnings for
-Wimplicit-fallthrough, near the macro CASE.  To handle this
problem, we use GCC's extension of unused label and fallthrough
attributes.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Cherry-picked from gnupg master commit of:
99c17b970bc0ca7e0cff7fe031c6f9feb05af3ff

6 weeks agopo: Fix the previous commit.
NIIBE Yutaka [Thu, 6 Sep 2018 00:58:13 +0000 (09:58 +0900)]
po: Fix the previous commit.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
6 weeks agopo: Update Japanese Translation.
NIIBE Yutaka [Wed, 5 Sep 2018 03:15:17 +0000 (12:15 +0900)]
po: Update Japanese Translation.

6 weeks agogpg-error-config: Forward compatibility support.
NIIBE Yutaka [Wed, 5 Sep 2018 02:55:55 +0000 (11:55 +0900)]
gpg-error-config: Forward compatibility support.

* src/gpg-error-config.in: Support --variable=* option.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
6 weeks agogpg-error-config: Determine output at configure time.
NIIBE Yutaka [Tue, 4 Sep 2018 01:45:49 +0000 (10:45 +0900)]
gpg-error-config: Determine output at configure time.

* src/gpg-error-config.in (isubdirafter): Remove.
Also for --cflags and --libs.
* configure.ac (GPG_ERROR_CONFIG_ISUBDIRAFTER): Remove.
(GPG_ERROR_CONFIG_CFLAGS): Add -idirafter gpg-extra for W32CE.
(GPG_ERROR_CONFIG_CFLAGS): Decide here if adding -I$includedir.
(GPG_ERROR_CONFIG_LIBS): Decide here if adding -L$libdir.

--

Don't do string substitution at the time of its command invocation,
but let it determine at configure time.

3 months agobuild: use EXEEXT_FOR_BUILD everywhere.
Michael Haubenwallner [Thu, 12 Jul 2018 15:36:13 +0000 (17:36 +0200)]
build: use EXEEXT_FOR_BUILD everywhere.

* src/Makefile.am: Use EXEEXT_FOR_BUILD with all build tools.

Signed-off-by: Michael Haubenwallner
<michael.haubenwallner@ssi-schaefer.com>

3 months agoPost release updates
Werner Koch [Thu, 12 Jul 2018 09:08:47 +0000 (11:08 +0200)]
Post release updates

--

3 months agoRelease 1.32 libgpg-error-1.32
Werner Koch [Thu, 12 Jul 2018 08:59:54 +0000 (10:59 +0200)]
Release 1.32

Signed-off-by: Werner Koch <wk@gnupg.org>
3 months agoestream: Always propagate flush event to cookie functions.
Werner Koch [Thu, 12 Jul 2018 07:17:52 +0000 (09:17 +0200)]
estream: Always propagate flush event to cookie functions.

* src/estream.c (flush_stream): Always call cookie's flush func.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 months agobuild: Use AX_CC_FOR_BUILD and EXEEXT.
NIIBE Yutaka [Wed, 11 Jul 2018 01:56:30 +0000 (10:56 +0900)]
build: Use AX_CC_FOR_BUILD and EXEEXT.

* configure.ac (AX_CC_FOR_BUILD): New.
* doc/Makefile.am: Use EXEEXT and EXEEXT_FOR_BUILD.
* m4/ac_prog_cc_for_build.m4: Remove.
* m4/ax_cc_for_build.m4: New.

--

Suggested-by: Michael Haubenwallner
      <michael.haubenwallner@ssi-schaefer.com>
Fixes-commit: 6eb80abcde5ad776379069871e4156b28ef69712
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
3 months agodoc: Now, yat2m is a standard tool.
NIIBE Yutaka [Wed, 11 Jul 2018 01:54:09 +0000 (10:54 +0900)]
doc: Now, yat2m is a standard tool.

* configure.ac (YAT2M, HAVE_YAT2M): Remove.
* doc/Makefile.am: Always use yat2m which comes with this source.

--

Suggested-by: Michael Haubenwallner
      <michael.haubenwallner@ssi-schaefer.com>
Fixes-commit: 4dc6d4d2067c726cdb13593bf151637319ff65e6
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
3 months agobuild: Remove version_parts in autogen.sh.
NIIBE Yutaka [Tue, 10 Jul 2018 08:10:13 +0000 (17:10 +0900)]
build: Remove version_parts in autogen.sh.

* autogen.rc (version_parts): Remove.
* autogen.sh: Determine by $micro argument.

--

It can be determined by the invocation of

    ./autogen.sh --find-version

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
3 months agoRemove leftover debug output from gpg-error.
Werner Koch [Thu, 5 Jul 2018 06:58:39 +0000 (08:58 +0200)]
Remove leftover debug output from gpg-error.

* src/gpg-error.c (main): Remove a log_debug.
--

Also a few typo fixes.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 months agopo: Update Ukrainian translation.
Yuri Chornoivan [Sat, 14 Apr 2018 18:17:15 +0000 (21:17 +0300)]
po: Update Ukrainian translation.

3 months agocore: Initialize values in estream_format
Andre Heinecke [Wed, 4 Jul 2018 16:19:42 +0000 (18:19 +0200)]
core: Initialize values in estream_format

* src/estream-printf.c (_gpgrt_estream_format): Make sure
valuetable.value is inialized even on stack.

--
This makes the behavior more consistent with the calloc'ed
codepath for more then 8 variables.

It also fixes a potential crash if there were unmatched
format args provided.

GnuPG-Bug-Id: T4054

4 months agopo: Update Russian translation.
Ineiev [Sat, 21 Apr 2018 10:07:08 +0000 (10:07 +0000)]
po: Update Russian translation.

4 months agocore: Fix problem with C11 and stdnoreturn.h.
Werner Koch [Wed, 30 May 2018 15:08:54 +0000 (17:08 +0200)]
core: Fix problem with C11 and stdnoreturn.h.

* src/gpg-error.h.in (GPGRT_ATTR_NORETURN): Use gcc specific symbol name
__noreturn__.
--

GnuPG-bug-id: 4002
Signed-off-by: Werner Koch <wk@gnupg.org>
4 months agopo: More Spanish translations.
emma peel [Sat, 26 May 2018 09:02:06 +0000 (09:02 +0000)]
po: More Spanish translations.

--

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
5 months agodoc: Fix yat2m name for native w32 build
Andre Heinecke [Thu, 3 May 2018 12:27:51 +0000 (14:27 +0200)]
doc: Fix yat2m name for native w32 build

* doc/Makefile.am: Handle not cross compiling but building for
windows.

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
5 months agoPost release updates
Werner Koch [Wed, 2 May 2018 18:36:45 +0000 (20:36 +0200)]
Post release updates

--

5 months agoRelease 1.31. libgpg-error-1.31
Werner Koch [Wed, 2 May 2018 18:28:38 +0000 (20:28 +0200)]
Release 1.31.

* configure.ac: Set LT version to C24/A24/R2.

5 months agopo: Enable Spanish translation
Werner Koch [Tue, 1 May 2018 17:45:42 +0000 (19:45 +0200)]
po: Enable Spanish translation

--

Signed-off-by: Werner Koch <wk@gnupg.org>
5 months agocore,w32: Avoid recursive use of npth_unprotect.
Werner Koch [Tue, 1 May 2018 17:35:28 +0000 (19:35 +0200)]
core,w32: Avoid recursive use of npth_unprotect.

* src/w32-estream.c (reader): Use standard free.
(writer): Ditto.
--

There are two errors: The minor one is that we allocated with calloc
but released with _gpgrt_free.  The major one is the recursive use of
npth_unprotect due to the syscall_clamp mechanism:

1. Around the call to _gpgrt_w32_poll

2. By gpgrt_lock_lock on behalf of a the custom allocation handler in
   the worker threads at their _gpgrt_free.

This problem was exhibited by GnuPG's dirmngr component.

GnuPG-bug-id: 3937
Signed-off-by: Werner Koch <wk@gnupg.org>
5 months agopo: new Spanish translation
emma peel [Sun, 15 Apr 2018 08:54:29 +0000 (08:54 +0000)]
po: new Spanish translation

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
5 months agoPost release updates
Werner Koch [Mon, 30 Apr 2018 06:39:11 +0000 (08:39 +0200)]
Post release updates

--

5 months agoRelease 1.30. libgpg-error-1.30
Werner Koch [Mon, 30 Apr 2018 06:33:14 +0000 (08:33 +0200)]
Release 1.30.

* configure.ac: Bump LT version to C24/A/24/R1.

Signed-off-by: Werner Koch <wk@gnupg.org>
5 months agobuild: More release creation automation.
Werner Koch [Mon, 30 Apr 2018 06:24:12 +0000 (08:24 +0200)]
build: More release creation automation.

* Makefile.am: Add release and sign-release targets.

Signed-off-by: Werner Koch <wk@gnupg.org>
5 months agocore: Fix gpgrt_poll for Windows under nPth.
Werner Koch [Mon, 30 Apr 2018 05:49:11 +0000 (07:49 +0200)]
core: Fix gpgrt_poll for Windows under nPth.

* src/estream.c (_gpgrt_poll) [W32]: Use syscall clamp.

Signed-off-by: Werner Koch <wk@gnupg.org>
6 months agodoc: Add SPDX indentifier for the versioninfo template.
Werner Koch [Mon, 23 Apr 2018 10:49:12 +0000 (12:49 +0200)]
doc: Add SPDX indentifier for the versioninfo template.

--

6 months agodoc: Fix yat2m build for cross compilation.
NIIBE Yutaka [Fri, 13 Apr 2018 06:45:54 +0000 (15:45 +0900)]
doc: Fix yat2m build for cross compilation.

* doc/Makefile.am: Fix target of yat2m-for-build.

--

GnuPG-bug-id: 3901
Fixes-commit: efc4769339d42a4a399c040c146cf4a29c02ea4f
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
6 months agobuild: Check -lsocket -lnsl for Solaris.
NIIBE Yutaka [Thu, 12 Apr 2018 00:40:19 +0000 (09:40 +0900)]
build: Check -lsocket -lnsl for Solaris.

* configure.ac: Check inet_addr for -lnsl, and socket for -lsocket.

--

Once I used LIB_SOCKET_NSL for the variable name, but it is already
used by AX_LIB_SOCKET_NSL in autoconf-archive as an alias of the
macro.  So, I changed the variable name.

GnuPG-bug-id: 3869
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
6 months agobuild: Make sure version.texi is generated in time.
Damien Goutte-Gattat via Gnupg-devel [Wed, 11 Apr 2018 15:06:01 +0000 (16:06 +0100)]
build: Make sure version.texi is generated in time.

[[PGP Signed Part:Good signature from AA4373E6C82C78AD Damien Goutte-Gattat <dgouttegattat@incenp.org> (trust undefined) created at 2018-04-11T17:05:27+0200 using RSA]]
[1. text/plain]

* doc/Makefile.am (yat2m-stamp): Depend on version.texi.
--

When building from a cloned Git repository and with `make -j 3`
(or higher), the version.texi file may not have been generated
yet when yat2m is called to generate the man page, resulting in
a build failure.

Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
6 months agoPost release updates
Werner Koch [Wed, 11 Apr 2018 07:40:17 +0000 (09:40 +0200)]
Post release updates

--

6 months agoRelease 1.29 gpgrt-1.29 libgpg-error-1.29
Werner Koch [Wed, 11 Apr 2018 07:24:03 +0000 (09:24 +0200)]
Release 1.29

* configure.ac: Bump LT version to C24/A24/R0.

Signed-off-by: Werner Koch <wk@gnupg.org>
6 months agodoc: Beautify comments in gpg-error.h.
Werner Koch [Wed, 11 Apr 2018 07:12:39 +0000 (09:12 +0200)]
doc: Beautify comments in gpg-error.h.

--

Signed-off-by: Werner Koch <wk@gnupg.org>
6 months agocore: Finalize the API for argparse.
Werner Koch [Wed, 11 Apr 2018 07:10:14 +0000 (09:10 +0200)]
core: Finalize the API for argparse.

* src/gpg-error.h.in (ARGPARSE_end): Simplify.
* src/argparse.c (_gpgrt_argparse_internal_s): Add field opts.
(deinitialize): Release new field.
(initialize): Add arg opts and create a copy of the option list.  Add
the internal options.
(_gpgrt_argparse): Rename arg opts to opts_orig and set new local var
opts.  Adjust all references to opts.
(find_long_option): Adjust for chnaged type of OPTS.  Re-indent.
(arg_parse): Remove internal option assignment.  Rename arg opts to
opts_orig and set new local var opts.  Adjust all references to opts.
(show_help): Adjust all references to opts.
--

The old ARGPARSE_end maro was a bit cumbersome and does not allow to
chnage the number of internal options.  Thus this somewhat larger
chnage to keep the internal options out of the API.

Note that with this change the internal options now also work in a
option file and not just on the command line; that does not make much
sense but is probably less surprising.

Signed-off-by: Werner Koch <wk@gnupg.org>
6 months agodoc: Fix previous commit.
NIIBE Yutaka [Tue, 27 Mar 2018 03:16:20 +0000 (12:16 +0900)]
doc: Fix previous commit.

--

Fixes-commit: efc4769339d42a4a399c040c146cf4a29c02ea4f
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
6 months agodoc: Support cross compilation for yat2m.
NIIBE Yutaka [Tue, 27 Mar 2018 00:53:42 +0000 (09:53 +0900)]
doc: Support cross compilation for yat2m.

* configure.ac (HAVE_YAT2M): New.
* doc/Makefile.am [CROSS_COMPILING]: Supported.

--

Makefile portability is also improved.

Fixes-commit: 4dc6d4d2067c726cdb13593bf151637319ff65e6
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
7 months agobuild: Okay travis, take this
Werner Koch [Thu, 22 Mar 2018 20:26:24 +0000 (21:26 +0100)]
build: Okay travis, take this

--

7 months agobuild: Another try on travis.yml
Werner Koch [Thu, 22 Mar 2018 20:10:21 +0000 (21:10 +0100)]
build: Another try on travis.yml

--

Why don't they return useful error messages????

7 months agobuild: And even more travis.yml tweaking
Werner Koch [Thu, 22 Mar 2018 20:08:45 +0000 (21:08 +0100)]
build: And even more travis.yml tweaking

--

7 months agobuild: And more travis.yml tweaking
Werner Koch [Thu, 22 Mar 2018 20:00:51 +0000 (21:00 +0100)]
build: And more travis.yml tweaking

--

7 months agobuild: More travis.yml tweaking
Werner Koch [Thu, 22 Mar 2018 19:28:38 +0000 (20:28 +0100)]
build: More travis.yml tweaking

--

7 months agobuild: Update travis configuration.
Werner Koch [Thu, 22 Mar 2018 18:55:51 +0000 (19:55 +0100)]
build: Update travis configuration.

--

7 months agobuild: Add option --git-build to autogen.sh
Werner Koch [Thu, 22 Mar 2018 18:55:31 +0000 (19:55 +0100)]
build: Add option --git-build to autogen.sh

7 months agobuild: Testing travis.
Werner Koch [Thu, 22 Mar 2018 18:32:59 +0000 (19:32 +0100)]
build: Testing travis.

--

7 months agodoc: Update NEWS
Werner Koch [Thu, 22 Mar 2018 17:37:13 +0000 (18:37 +0100)]
doc: Update NEWS

--

7 months agoyat2m: Avoid compiler warnings
Werner Koch [Thu, 22 Mar 2018 16:42:20 +0000 (17:42 +0100)]
yat2m: Avoid compiler warnings

* doc/yat2m.c (evaluate_conditions): Mark args unused
(proc_texi_cmd): Avoid shadowing warning.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agocore: Remove outdated comments.
Werner Koch [Thu, 22 Mar 2018 16:21:32 +0000 (17:21 +0100)]
core: Remove outdated comments.

--

7 months agocore: Add Base-64 encoder.
Werner Koch [Thu, 22 Mar 2018 16:20:52 +0000 (17:20 +0100)]
core: Add Base-64 encoder.

* src/b64enc.c: Change to fit into libgpg-error.
* src/Makefile.am: Add b64enc.c
* src/b64dec.c: Use xtrymalloc etc.  Always use gpg_err_code_t.
(_gpgrt_b64dec_start): Set decoder flag
(_gpgrt_b64dec_finish): Check for conflict.
(_gpgrt_b64state): Move to ...
* src/gpgrt-int.h: here.  Add new fields.
* src/visibility.c (gpgrt_b64enc_start): New.
(gpgrt_b64enc_write): New.
(gpgrt_b64enc_finish): New.
* src/gpg-error.vers, src/gpg-error.def.in: Add new functions.
* src/gpg-error.h.in: Ditto.
* src/visibility.h: Ditto.

* tests/t-b64dec.c: Remove.
* tests/t-b64.c: New.
* tests/Makefile.am (TESTS): Replace t-b64dec by t-b64.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agocore: Add file b64enc.c from gnupg
Werner Koch [Thu, 22 Mar 2018 07:26:51 +0000 (08:26 +0100)]
core: Add file b64enc.c from gnupg

--

This is from GnuPG commit fa0ed1c7e2eee7c559026696e6b21acc882a97aa
with two tabs replaced by spaces.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agodoc: Fix build and installation of yat2m.
NIIBE Yutaka [Thu, 22 Mar 2018 02:15:15 +0000 (11:15 +0900)]
doc: Fix build and installation of yat2m.

* configure.ac (YAT2M): Require it when cross compiling.
* doc/Makefile.am (bin_PROGRAMS): Add yat2m.

--

Before 1.28, yat2m used to be an internal tool.  Now, it's a standard
tool.  For native build, it is built and used for initial
installation.  For cross build, it is required on the build system.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
7 months agopo: Update one fuzzy in all translations.
Werner Koch [Wed, 21 Mar 2018 18:06:40 +0000 (19:06 +0100)]
po: Update one fuzzy in all translations.

--

This was due to the removal of the "%s: " used for the prefix in a
printf.  It is now printed with log_error which prints the prefix on
its own.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agopo: Merge GnuPG's strings from argparse.c
Werner Koch [Wed, 21 Mar 2018 17:53:34 +0000 (18:53 +0100)]
po: Merge GnuPG's strings from argparse.c

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agotools: Use gpgrt_argparse for the gpg-error tool.
Werner Koch [Wed, 21 Mar 2018 17:36:23 +0000 (18:36 +0100)]
tools: Use gpgrt_argparse for the gpg-error tool.

* src/gpg-error.c (show_usage): Remove.
(my_strusage): New.
(main): Change to use argparse.  Also use log_error.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agocore: Add public function gpgrt_usage.
Werner Koch [Wed, 21 Mar 2018 17:34:15 +0000 (18:34 +0100)]
core: Add public function gpgrt_usage.

* src/visibility.c (gpgrt_usage): New.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agocore: Add the group of argparse functions.
Werner Koch [Wed, 21 Mar 2018 15:23:29 +0000 (16:23 +0100)]
core: Add the group of argparse functions.

* src/visibility.c (gpgrt_argparse): New.
(gpgrt_strusage): New.
(gpgrt_set_strusage): New.
(gpgrt_set_usage_outfnc): New.
(gpgrt_set_fixed_string_mapper): New.
* src/gpg-error.def.in, src/gpg-error.vers: Add new functions.
* src/gpg-error.h.in: Add ARGPARSE macros from the former argparse.h.
(gpgrt_argparse_t): New.
(gpgrt_opt_t): New.
* configure.ac (AH_BOTTOM): Request argparse macros.
* src/Makefile.am (libgpg_error_la_SOURCES): Add argparse.c.
* src/argparse.h: Remove.
* src/argparse.c: Revamp to fit into libgpg-error.
(_gpgrt_argparse): New.
(_gpgrt_usage): Rename from usage.
(_gpgrt_strusage): Rename from strusage.  Define two new levels and
templates for three common licenses.
(_gpgrt_set_strusage): Rename from set_strusage.
(_gpgrt_set_usage_outfnc): New.
(_gpgrt_set_fixed_string_mapper): New.

* tests/t-argparse.c: New.
--

These functions are in use by GnuPG and other software for 20 years
and it makes sense to have them always available instead of copying
and maintaing the source in several projects.  Note that there are
minor changes in the API compared to GnuPG.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agocore: Import argparse code from gnupg master
Werner Koch [Wed, 21 Mar 2018 08:22:09 +0000 (09:22 +0100)]
core: Import argparse code from gnupg master

--

7 months agocore: Fix regression on arm64 due to invalid use of va_list.
Werner Koch [Sun, 18 Mar 2018 16:39:43 +0000 (17:39 +0100)]
core: Fix regression on arm64 due to invalid use of va_list.

* src/logging.c (_gpgrt_log_printhex): Provide a dummy arg instead of
NULL.
--

Fix
Suggested-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agocore: Fix building on W64
Werner Koch [Wed, 14 Mar 2018 09:07:42 +0000 (10:07 +0100)]
core: Fix building on W64

* src/w32-add.h: Remove hack to define pid_t.
* src/gpg-error.h.in: Eval macro to define pid_t.
* src/mkheader.c (have_sys_types_h, sys_types_h_included): New.
(parse_config_h): Test for sys/types.h.
(write_special): Protect inclusion of sys/types.h.  Define new macro
'define:pid_t'.
--

Regression-due-to: 1865c0ba1769b407a3c504f1ab0a4278704a9fc1
Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agoPost release updates
Werner Koch [Tue, 13 Mar 2018 12:42:17 +0000 (13:42 +0100)]
Post release updates

--

7 months agoRelease 1.28 gpgrt-1.28 libgpg-error-1.28
Werner Koch [Tue, 13 Mar 2018 12:02:58 +0000 (13:02 +0100)]
Release 1.28

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agobuild: Update copyright notices and remove gpgscm from the release.
Werner Koch [Tue, 13 Mar 2018 10:36:17 +0000 (11:36 +0100)]
build: Update copyright notices and remove gpgscm from the release.

--

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agocore: Fix regression due to not exporting the process API.
Werner Koch [Tue, 13 Mar 2018 08:57:46 +0000 (09:57 +0100)]
core: Fix regression due to not exporting the process API.

--
Fixes-commit: 0e503cae75cb1a6aa257228a65941b7630ff35d6

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agocore: Remove accidently committed time function API.
Werner Koch [Mon, 12 Mar 2018 10:50:51 +0000 (11:50 +0100)]
core: Remove accidently committed time function API.

--

Fixes-commit: f9a33a7f7e44a644ff4e31f7e9f1c2c1ec1f8eee

7 months agocore: Do not export the process API
Werner Koch [Mon, 12 Mar 2018 10:01:27 +0000 (11:01 +0100)]
core: Do not export the process API

--

We may need to change the API and thus we better wait before
publishing this new interface.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agosyscfg: Add a riscv64 architecture.
NIIBE Yutaka [Wed, 28 Feb 2018 01:47:51 +0000 (10:47 +0900)]
syscfg: Add a riscv64 architecture.

* src/syscfg/lock-obj-pub.riscv64-unknown-linux-gnu.h: New.
* src/Makefile.am (lock_obj_pub): Add it.
--

Debian-bug-id: 891663
Co-authored-by: Karsten Merker <merker@debian.org>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
7 months agobuild: Document how to use git send-email.
Werner Koch [Wed, 21 Feb 2018 17:23:52 +0000 (18:23 +0100)]
build: Document how to use git send-email.

* autogen.rc: Add patches_to.
* autogen.sh: Run git config sendemail.to.
* doc/HACKING: Describe use of git send-email.
--

Co-authored-by: Todd Zullinger
Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agodoc: clarify patch submission workflow
Thorsten Behrens [Thu, 1 Feb 2018 13:24:07 +0000 (14:24 +0100)]
doc: clarify patch submission workflow

Signed-off-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
7 months agodoc: Typo fixes.
Werner Koch [Wed, 21 Feb 2018 16:54:30 +0000 (17:54 +0100)]
doc: Typo fixes.

--

7 months agobuild: let autogen.sh set a git PATCH prefix
Werner Koch [Wed, 21 Feb 2018 16:53:36 +0000 (17:53 +0100)]
build: let autogen.sh set a git PATCH prefix

--

Also commit the missing commit-msg hook.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agocore: Avoid using estream_t in the public API.
Werner Koch [Mon, 11 Dec 2017 15:33:37 +0000 (16:33 +0100)]
core: Avoid using estream_t in the public API.

* src/gpg-error.h.in: Always use gpgrt_stream-t.
--

estream_t can only be used if GPGRT_ENABLE_ES_MACROS is defined.

Fixes-commit: 1865c0ba1769b407a3c504f1ab0a4278704a9fc1
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agocore: Rename the gpgrt_log_levels enum values.
Werner Koch [Fri, 8 Dec 2017 12:31:07 +0000 (13:31 +0100)]
core: Rename the gpgrt_log_levels enum values.

* src/gpg-error.h.in (gprt_log_levels): Rename to GPGRT_LOGLVL.
--

Explicitly naming them and not distinguishing them from the other log
constants is a Good Thing anyway.  It also helps against the symbol name
clash with the GPGRT enum values from gnupg's logging module.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agocore: Wrap blocking system calls of the spawn functions.
Werner Koch [Wed, 29 Nov 2017 20:13:11 +0000 (21:13 +0100)]
core: Wrap blocking system calls of the spawn functions.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agocore: Unify syscall_clamp functions.
Werner Koch [Wed, 29 Nov 2017 19:22:06 +0000 (20:22 +0100)]
core: Unify syscall_clamp functions.

* src/estream.c (_gpgrt_set_syscall_clamp)
(_gpgrt_get_syscall_clamp): Move to ...
* src/syscall-clamp.c: new file.
(_gpgrt_pre_syscall, _gpgrt_post_syscall): New.
* src/Makefile.am (libgpg_error_la_SOURCES): Add that file.
* src/estream.c: Replace the syscall wrapper with the new functions.
* src/posix-lock.c: Ditto.
* src/w32-lock.c: Ditto.
* src/posix-thread.c: Ditto.
* src/w32-thread.c: Ditto.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agocore: Implement the spawn functions.
Werner Koch [Wed, 29 Nov 2017 18:29:18 +0000 (19:29 +0100)]
core: Implement the spawn functions.

* src/gpg-error.h.in  (GPGRT_SPAWN_NONBLOCK): New const.
(GPGRT_SPAWN_RUN_ASFW): New const.
(GPGRT_SPAWN_DETACHED): New const.
(gpgrt_make_pipe): New function.
(gpgrt_create_pipe): New macro.
(gpgrt_create_inbound_pipe): New macro.
(gpgrt_create_outbound_pipe): New macro.
(gpgrt_spawn_process): New function.
(gpgrt_spawn_process_fd): New function.
(gpgrt_spawn_process_detached): New function.
(gpgrt_wait_process): New function.
(gpgrt_wait_processes): New function.
(gpgrt_kill_process): New function.
(gpgrt_release_process): New function.
* src/gpg-error.def.in, src/gpg-error.vers: Add new functions.
* src/visibility.c, src/visibility.h: Add wrappers for new functions.
* src/spawn-posix.c: Rework to better fit the use in gpgrt.  Rename
all public function with a _gpgrt prefix.
* src/spawn-w32.c: Ditto.
* src/gpgrt-int.h: Likewise.
* src/Makefile.am (arch_sources): Add spawn-posix.c and spawn-w32.c.
* src/w32-add.h: Add pid_t typedef as a temporary hack.
* configure.ac: Check for signal.h and getrlimit.
(AC_FUNC_FORK): New.
--

This does build but porting the tests and further changes are
required.  Don't assume that the API for the new fucntions is stable.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agoImport and relicense exechelp* functions from GnuPG.
Werner Koch [Wed, 29 Nov 2017 10:48:52 +0000 (11:48 +0100)]
Import and relicense exechelp* functions from GnuPG.

* src/spawn-posix.c: New.  Taken from GnuPG's exechelp-posix.c.
* src/spawn-w32.c: New.  Taken from GnuPG's exechelp-w32.c.
* src/gpgrt-int.h: Include prototypes from GnuPG's exechelp.h.
--

The original files were under (LGPL-3.0+ OR GPL-2.0+) and have
entirely been written by g10 Code employees.  Being the responsible
person at g10 Code, I endorse the license change to LGPL-2.1.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agocore: Change new functions to return gpg_err_code_t.
Werner Koch [Tue, 28 Nov 2017 15:36:12 +0000 (16:36 +0100)]
core: Change new functions to return gpg_err_code_t.

* src/gpg-error.h.in (gpgrt_sentenv, gpgrt_mkdir, gpgrt_chdir): Change
return type to gpg_err_code_t.
* src/sysutils.c (_gpgrt_setenv): Implement that.
(_gpgrt_mkdir): Ditto.
(_gpgrt_chdir): Ditto.
* gpgscm/ffi.c (do_setenv, do_mkdir): Adjust for this change.
--

The functions are already a bit different and thus it is useful to let
them return a gpg-error style error code and don't let the user
implement that for each call.

Signed-off-by: Werner Koch <wk@gnupg.org>