* configure.ac (NEED_GPG_ERROR_VERSION): Require 1.36.
* src/cJSON.c: Remove code for older version.
* src/engine.c (gpgme_get_engine_info): Ditto.
* src/gpgme-json.c: Ditto.
* src/op-support.c: Ditto.
* src/util.h: Ditto.
--
Libgpg-error 1.36 has been released more than 18 months ago so it is
time to avoid hacks and require this verion. This will for example
help Kleopatra to support PIV cards and improves the gpgme-json.
Signed-off-by: Werner Koch <wk@gnupg.org>
* configure.ac: Configure new Makefiles.
* lang/python/Makefile.am: Remove dirs from extra dist and use
subdirs.
* lang/python/examples/Makefile.am, lang/python/src/Makefile.am,
lang/python/doc/Makefile.am: New. Files that list EXTRA_DIST files.
--
This is similar to what lang/js does by explicitly listing the
files. This ensures that we have clean distribution tarballs
without accidentall additions that just lay in the directory.
GnuPG-Bug-Id: T4481
* configure.ac (CFLAGS): Move -Wno flags out of the maintainer mode.
--
It makes sense to have more warnings in maintainer mode and
not more warnings in release builds.
GnuPG-Bug-Id: T4477
* configure.ac: Add -Wno-format-truncation and
-Wno-sizeof-pointer-div.
* src/b64dec.c (_gpgme_b64dec_proc): Add fallthrough annotation.
* src/cJSON.c (parse_string): Ditto.
* src/gpgme-json.c (main): Ditto.
--
gcc 8 enables a couple of new warnings. Some of them are useless for
us. In particular:
util.h:42:26: warning: division 'sizeof (char *) / sizeof (char)'
does not compute the number of array elements [-Wsizeof-pointer-div]
#define DIM(v) (sizeof(v)/sizeof((v)[0])) ^
trustlist.c:101:22: note:
in expansion of macro 'DIM' if (strlen (p) == DIM(item->keyid) - 1)
Which is a real standard way to use DIM, here the right hand side is
equivalent to sizeof but nevertheless it is correct. Yes sir, we know
C.
The format string warnings I have seen were assuming that the time
structure returns valued out of scope - but if the system is that
broken, the s_n_printf catches this.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/debug.h (TRACE_BEG, TRACE_LOG, TRACE_SUC): Use variadic macros
and remove the TRACE_BEG1 et al. Change all users to always pass a
format string.
(TRACE): Ditto.
* src/debug.c (_gpgme_debugf): New.
* configure.ac <GCC>: Add -Wno-format-zero-length.
--
This makes it easier for use to enable format checks. The zero-length
format is required to allow for an empty format due to the comman
problematic of __VA_ARGS__.
Signed-off-by: Werner Koch <wk@gnupg.org>
* configure.ac: Configure makefile.
* tests/Makefile.am: Run json tests if gpg tests are run.
* tests/json/t-json.c: New testrunner for json tests.
* tests/json/t-config.in, tests/json/t-config.out: First test.
--
The idea of this test runner is that it only looks for parts
in the output. This should allow it to write robust tests
that check for the basics in the output but don't fail when
the output is extended or slightly changed.
* configure.ac: Generate src/gpgme.pc.
* src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New.
(EXTRA_DIST): Add gpgme.pc.in.
* src/gpgme.pc.in: New.
* src/gpgme-config.in: Use variables.
--
Some usages of gpgme-config is not compatible to pkg-config style;
The --glib option and --thread option which affect the output
by --cflags or --libs are not supported by gpgme.pc.
gpgme-config's embedding information for gpg-error and libassuan at
the build time of gpgme is considered inflexible than pkg-config
style. It is now handled by dependency of gpgme.pc (Requires field).
To use gpgme.pc, newer libgpg-error (>= 1.33) and libassuan (>= 2.5.3)
are required, which provide gpg-error.pc and libassuan.pc respectively.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* configure.ac: Remove WindwosCE support.
* contrib/: Remove all; it was only used for WindowsCE.
* src/w32-ce.c, src/w32-ce.h: Remove files.
* src/Makefile.am (system_components): Remove these files.
* src/ath.c, src/ath.h: Remove W32CE support.
* src/data-compat.c (gpgme_data_new_from_filepart): Ditto.
(gpgme_data_new_from_file): Ditto.
* src/debug.c (debug_init, _gpgme_debug): Ditto.
* src/gpgme-tool.c (gpgme_server): Ditto.
(main): Ditto.
* src/priv-io.h: Do not include w32-ce.h.
* src/util.h: Remove WindowsCE support.
* src/w32-io.c: Ditto.
* src/w32-util.c: Ditto.
* src/debug.h (TRACE_SUC4): New.
--
There is no more hardware to test our code, the support for Windows CE
terminated along time ago. Note that our code worked only with the
old WindowsCE with that overall system limit of 31 processes.
Signed-off-by: Werner Koch <wk@gnupg.org>
* m4/python.m4 (AM_PATH_PYTHON): Add a 4th arg.
* configure.ac (available_languages): Remove separate python2 and
python3 and keep just python. Simplify test for pythons. Use an
explicit list of python versions to test.
--
This seems to be a starightforward chnage to support more than two
python versions. I am not sure why we had that complicated thing
before. On my box I get builds and run tests for 2.7, 3.4 and 3.5.
If 3.6, 3.7 or 3.8 are installed they should also work.
GnuPG-bug-id: 3354
Signed-off-by: Werner Koch <wk@gnupg.org>
* autogen.sh: Update from libgpg-error.
* configure.ac: Use mym4_version to create VERSION file.
* Makefile.am (dist-hook): Do not create VERSION.
(EXTRA_DIST): Add VERSION.
--
GnuPG-bug-id: 3283
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* lang/cpp/Makefile.am: Add tests subdir.
* lang/cpp/tests/Makefile.am: New.
* lang/cpp/tests/README,
lang/cpp/tests/run-getkey.cpp,
lang/cpp/tests/run-keylist.cpp: New.
* configure.ac: Configure tests makefile.
--
The autotests for c++ live in lang/qt/tests these
tests are more for manual experiments to validate some
functionality.
* configure.ac: Bump core LT version to C32/A21/R0. Bump C++ LT
version to C14/A8/R0.
* lang/qt/tests/Makefile.am (CLEANFILES): Add reader status files.
* Makefile.am (EXTRA_DIST): Add conf/whatisthis.
Signed-off-by: Werner Koch <wk@gnupg.org>
* conf/: New dir.
* configure.ac (AC_CONFIG_HEADER): Move header to conf dir.
* doc/Makefile.am (mkdefsinc): Adjust rule.
* lang/python/Makefile.am (copystamp): Ditto.
--
C++ uses those stupid files without a suffix and thus the new standard
header <version> as included by newer other libc++ versions may
conflict with the VERSION file in out top directory. This change
should solve the problem.
GnuPG-bug-id: 4168
Signed-off-by: Werner Koch <wk@gnupg.org>
This adds a new language binding "gpgme.js" to GPGME. It
serves as a bridge between the native-messaging service "gpgme-json"
and JavaScript Applications.
The first user of this binding will be Mailvelope which will
see GnuPG integration in the near future.
GnuPG-Bug-Id: T4107
* configure.ac: Remove js language.
--
It does not make much sense to integrate gpgme-js into the
GPGME build system. gpgme-js will be distrbuted by it's users
as part of the web extensions / their distribution as that
is the JavaScript way.
So they can use their tools etc. to compile gpgme-js JavaScript
style, which is documented in the lang/js folder.
* src/data.h (data_prop_t): New enum.
(struct gpgme_data): Add field propidx.
* src/data.c (property_t): New.
(property_table, property_table_size, property_table_lock): New.
(insert_into_property_table): New.
(remove_from_property_table): New.
(_gpgme_data_get_dserial): New.
(_gpgme_data_set_prop): New.
(_gpgme_data_get_prop): New.
(_gpgme_data_new): Connect new object to property_table.
(_gpgme_data_release): Remove from property_table.
(gpgme_data_read): With DATA_PROP_BLANKOUT set don't fill the buffer.
* src/data-mem.c (gpgme_data_release_and_get_mem): Likewise.
* src/decrypt.c (struct op_data): Add field plaintext_dserial.
(_gpgme_op_decrypt_init_result): Add arg plaintext and init new field.
(_gpgme_decrypt_status_handler): Set DATA_PROP_BLANKOUT on decryption
failure.
(_gpgme_decrypt_start): Pass PLAIN to the init function.
* src/decrypt-verify.c (decrypt_verify_start): Ditto.
* configure.ac: Check for stdint.h and bail out if uint64_t is not
available.
--
This is a best effort feature to not output plaintext after a
decryption failure (e.g. due to no or broken authenticated
encryption). It always work when using a memory object and reading it
after the decryption but it can't work reliable when the user is
reading from the data object while the decryption process is still
running.
This is quite a large change because the data objects and the context
objects are allowed to be owned by different threads. Thus a
synchronization is needed and we do this with a global table of all
data objects to which the context objects can do soft-linking via a
unique data object serial number.
Signed-off-by: Werner Koch <wk@gnupg.org>
* configure.ac: Add js as language.
* lang/Makefile.am: Add js as dist language.
* lang/js/BrowserTestExtension/Makefile.am,
lang/js/DemoExtension/Makefile.am,
lang/js/Makefile.am,
lang/js/src/Makefile.am: Populate EXTRA_DIST variables.
--
There is no actual build done yet as there seems to be
no way to build it with debian stable tools. This needs
clarification.
* configure.ac: have_thread_safe_getenv=yes with have_w32_system.
--
We want to define this for both 32 and 64 bit targets if
we use mingw. have_w32_system is defined for both targets.
Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
* src/util.h (GPG_ERR_FALSE): Remove due to newer libgpg-error.
--
We require these over one year old versions to better allign with
GnuPG's demand. Note that the required libassuan is acgtually 2 years
old.
Signed-off-by: Werner Koch <wk@gnupg.org>
* configure.ac (USE_LINUX_GETDENTS): New ac_define. Add option
--disable-linux-getdents.
* src/posix-io.c: Make use of USE_LINUX_GETDENTS.
Signed-off-by: Werner Koch <wk@gnupg.org>
* configure.ac: Remove PYTHON_VERSIONS subst.
* lang/python/Makefile.am: Use basename of python as builddir prefix.
* lang/python/tests/run-tests.py: Likewise.
--
Two variables needs be at sync PYTHONS and PYTHON_VERSIONS, these may go
out of sync in some cases, for example in Gentoo where default python is
3.4 we get:
PYTHON='/usr/bin/python2'
PYTHONS='/usr/bin/python /usr/bin/python2'
PYTHON_VERSIONS='2.7 3.4'
We can use the basename of the python interpreter to achieve similar
effect without having to sync indexes between these two variables.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
* lang/python/gpg/version.py.in: Rename to lang/python/version.py.in.
configure.ac: Generate version.py.in in lang/python.
* lang/python/MANIFEST.in: Include version.py explicitly.
* lang/python/gpg: Rename to 'src'.
* lang/python/Makefile.am: Do not copy source files, do not use absolute
directories, support lib64 in uninstall, clean also dist directory, use
symlink for gpg src.
* lang/python/setup.py.in: Use builddir, copy sources into builddir,
copy version.py into module.
--
Simplify build to symlink the gpg sources into builddir instead of
copying. This requires handling of version.py as generated file.
In addition apply some cleanups: Drop the absolution pathes, clean the
dist directory as well, support lib64 for sitelib at uninstall.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>