* autogen-all.sh (packages): Add lang/python.
* configure.ac: Add python to available languages if subdir exists. Add
python to nested languages if enabled to generate corresponding make
targets. Call configure script of nested python package recursively.
* lang/python/configure.ac: Check if Python bindings are built as
nested package and set GPGME_CFLAGS and GPGME_LIBS accordingly.
* lang/python/setup.py.in: Define some variables where they are used
first. Extract library directories from GPGME_LIBS variable similar
to the extraction of include directories from GPGME_CFLAGS. Adjust
library locations in case of win32 the same way as the include
locations. Prefer gpgme.h in the include directories from GPGME_CFLAGS
over the one in the prefix, so that the correct gpgme.h is taken in
case of nested builds.
--
This re-adds the ability to build the Python bindings together with
gpgme with a single `configure && make` command (if building from git).
GnuPG-bug-id: 7110
* autogen-all.sh (packages): Add lang/qt.
* configure.ac: Add qt to available languages if subdir exists. Add
qt to nested languages if enabled to generate corresponding make
targets. Call configure script of nested qt package recursively.
* lang/qt/configure.ac: Check if qgpgme is built as nested package
and set GPGME_CFLAGS, GPGME_LIBS, GPGMEPP_CFLAGS, and GPGMEPP_LIBS
accordingly.
--
This re-adds the ability to build the Qt bindings together with gpgme
with a single `configure && make` command (if building from git).
GnuPG-bug-id: 7110
* Makefile.am: Add variables languages, dist_languages,
distcheck_languages, release_languages, sign_release_languages,
distclean_languages. Add rules for nested language bindings.
(distclean-local, dist-all, distcheck-all, release-all,
sign-release-all): New rules.
(.PHONY): Add all new rules.
* autogen-all.sh: New.
* configure.ac: Add cpp to available languages if subdir exists. Add
cpp to nested languages if enabled to generate corresponding make
targets. Call configure script of nested cpp package recursively.
* lang/cpp/configure.ac: Check if gpgmepp is built as nested package
and set GPGME_CFLAGS and GPGME_LIBS accordingly.
--
This re-adds the ability to build the C++ bindings together with gpgme
with a single `configure && make` command (if building from git). It
also adds make targets for running dist, distcheck, release and
sign-release for gpgme and all enabled nested languages with a single
make command.
GnuPG-bug-id: 7110
* configure.ac: Remove "python" from available_languages and from
default_languages.
Remove checks for SWIG and available Python versions.
Remove substitution of PYTHONS.
Remove generation of files in lang/python.
* lang/Makefile.am (DIST_SUBDIRS): Remove python.
* lang/python/.gitignore, lang/python/AUTHORS, lang/python/COPYING,
lang/python/COPYING.LESSER, lang/python/ChangeLog, lang/python/INSTALL,
lang/python/NEWS, lang/python/autogen.rc, lang/python/autogen.sh,
lang/python/configure.ac: New.
* lang/python/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc.
copystamp: Remove symbolic linking of gpgme's internal data.h header
and of gpgme's config.h file.
CLEANFILES: Remove cleaning of config.h and data.h.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/python/build-aux/compile, lang/python/build-aux/config.guess,
lang/python/build-aux/config.sub, lang/python/build-aux/depcomp,
lang/python/build-aux/install-sh,
lang/python/build-aux/libtool-patch.sed,
lang/python/build-aux/ltmain.sh, lang/python/build-aux/missing: New.
* m4/ax_pkg_swig.m4: Move to...
* lang/python/m4/ax_pkg_swig.m4: ...here.
* m4/ax_python_devel.m4: Move to...
* lang/python/m4/ax_python_devel.m4: ...here.
* m4/python.m4: Move to...
* lang/python/m4/python.m4: ...here.
* lang/python/m4/gpg-error.m4, lang/python/m4/gpgme.m4,
lang/python/m4/libassuan.m4, lang/python/m4/libtool.m4,
lang/python/m4/ltoptions.m4, lang/python/m4/ltsugar.m4,
lang/python/m4/ltversion.m4, lang/python/m4/lt~obsolete.m4: New.
* lang/python/setup.py.in: Remove code for in-tree builds. Initialize
libs from @GPGME_LIBS@ instead of @GPGME_CONFIG_LIBS@. Initialize
include_dirs and define_macros from @GPGME_CFLAGS@ instead of
@GPGME_CONFIG_CFLAGS@. Look for gpgme.h in @prefix@/include and in
include_dirs and '/usr/include'.
* lang/python/tests/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F,
lang/python/tests/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD,
lang/python/tests/76F7E2B35832976B50A27A282D9B87E44577EB66,
lang/python/tests/7A030357C0F253A5BBCD282FFC4E521B37558F5C,
lang/python/tests/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New.
* lang/python/tests/Makefile.am (test_srcdir): Remove.
(TESTS_ENVIRONMENT): Remove adding .libs directory with gpgme library
to LD_LIBRARYPATH.
(private_keys): Use local copies instead of files from gpgme's
tests.
(EXTRA_DIST): Add new files.
(clean-local): Call local copy of start-stop-agent script.
(gpg-sample.stamp): Use local copies of private keys.
(pubring-stamp): Use local copies of pubdemo.asc and secdemo.asc.
(gpg-agent.conf): Use local copy of pinentry helper.
* lang/python/tests/cipher-1.asc, lang/python/tests/cipher-2.asc,
lang/python/tests/cipher-3.asc, lang/python/tests/cipher-no-sig.asc,
lang/python/tests/pinentry, lang/python/tests/pubdemo.asc,
lang/python/tests/pubkey-1.asc, lang/python/tests/secdemo.asc,
lang/python/tests/seckey-1.asc, lang/python/tests/start-stop-agent:
New.
* lang/python/tests/support.py (make_filename): Adapt to changed
path of test files.
--
This makes building and distributing the Python bindings independent of
the sources of gpgme. Many of the new files are copied from gpgme to
make the Python bindings a self-contained package. A later commit
re-adds the possibility to build the Python bindings as nested package
together with gpgme.
GnuPG-bug-id: 7110
* configure.ac: Remove definition and substitution of
LIBGPGMEPP_LT_CURRENT, LIBGPGMEPP_LT_AGE, LIBGPGMEPP_LT_REVISION.
Remove "cpp" from available_languages and from default_languages.
Remove checks for C++ 11 and for support of visibility attribute.
Remove substitution of GPGME_CPP_CFLAGS.
Remove definition and substitution of GPGMEPP_PKGCONFIG_LIBS,
GPGMEPP_PKGCONFIG_CFLAGS, GPGMEPP_PKGCONFIG_HOST.
Remove generation of files in lang/cpp.
* lang/Makefile.am (DIST_SUBDIRS): Remove cpp.
* lang/cpp/.gitignore, lang/cpp/AUTHORS, lang/cpp/COPYING,
lang/cpp/COPYING.LESSER, lang/cpp/COPYING.LIB, lang/cpp/ChangeLog,
lang/cpp/INSTALL, lang/cpp/NEWS, lang/cpp/autogen.rc,
lang/cpp/autogen.sh, lang/cpp/configure.ac: New.
* lang/cpp/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc,
VERSION.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/cpp/build-aux/compile, lang/cpp/build-aux/config.guess,
lang/cpp/build-aux/config.sub, lang/cpp/build-aux/depcomp,
lang/cpp/build-aux/install-sh, lang/cpp/build-aux/libtool-patch.sed,
lang/cpp/build-aux/ltmain.sh, lang/cpp/build-aux/missing: New.
* m4/ax_cxx_compile_stdcxx.m4: Move to...
* lang/cpp/m4/ax_cxx_compile_stdcxx.m4: ...here.
* m4/ax_gcc_func_attribute.m4: Move to...
* lang/cpp/m4/ax_gcc_func_attribute.m4: ...here.
* lang/cpp/m4/gpg-error.m4, lang/cpp/m4/gpgme.m4,
lang/cpp/m4/libtool.m4, lang/cpp/m4/ltoptions.m4,
lang/cpp/m4/ltsugar.m4, lang/cpp/m4/ltversion.m4,
lang/cpp/m4/lt~obsolete.m4: New.
* lang/cpp/src/GpgmeppConfig-w32.cmake.in.in,
lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove @LIBASSUAN_LIBS@ from
INTERFACE_LINK_LIBRARIES of Gpgmepp target.
* lang/cpp/src/Makefile.am (AM_CPPFLAGS): Replace include paths of
gpgme relative to top_builddir with @GPGME_CFLAGS@. Remove
@LIBASSUAN_CFLAGS@.
(libgpgmepp_la_LIBADD): Replace relative paths of libgpgme.la with
@GPGME_LIBS@. Remove @LIBASSUAN_LIBS@.
* lang/cpp/tests/Makefile.am (LDADD): Replace relative paths of
libgpgme.la with @GPGME_LIBS@.
(AM_CPPFLAGS): Replace include paths of gpgme relative to top_builddir
with @GPGME_CFLAGS@. Remove @LIBASSUAN_CFLAGS@. Remove -DTOP_SRCDIR.
--
This makes building and distributing GpgME++ independent of the sources
of gpgme. Many of the new files are copied from gpgme to make GpgME++ a
self-contained package. A later commit re-adds the possibility to build
GpgME++ as nested package together with gpgme.
GnuPG-bug-id: 7110
* configure.ac: Remove definition and substitution of
LIBQGPGME_LT_CURRENT, LIBQGPGME_LT_AGE, LIBQGPGME_LT_REVISION.
Remove "qt qt5 qt6" from available_languages.
Remove "qt" from default_languages.
Remove options --enable-reduce-relocations and
--enable-no-direct-extern-access.
Remove checks for pkg-config, Qt 5, Qt 6 and C++ 17.
Remove adding visibility flag to GPGME_QT5_CFLAGS and GPGME_QT6_CFLAGS.
Remove definition of conditionals WANT_QT5 and WANT_QT6.
Remove checks for doxygen and dot.
Remove generation of files in lang/qt.
* lang/Makefile.am (DIST_SUBDIRS): Remove qt.
* lang/qt/.gitignore, lang/qt/AUTHORS, lang/qt/COPYING,
lang/qt/ChangeLog, lang/qt/INSTALL, lang/qt/NEWS, lang/qt/autogen.rc,
lang/qt/autogen.sh, lang/qt/configure.ac: New.
* lang/qt/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc,
VERSION.
(RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook,
.PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release,
sign-release): New (copied from top-level Makefile.am).
* lang/qt/build-aux/compile, lang/qt/build-aux/config.guess,
lang/qt/build-aux/config.sub, lang/qt/build-aux/depcomp,
lang/qt/build-aux/install-sh, lang/qt/build-aux/libtool-patch.sed,
lang/qt/build-aux/ltmain.sh, lang/qt/build-aux/missing: New.
* lang/qt/doc/Doxyfile.in (INPUT): Update path.
* m4/ax_check_compile_flag.m4: Move to...
* lang/qt/m4/ax_check_compile_flag.m4: ...here
* m4/pkg.m4: Move to...
* lang/qt/m4/pkg.m4: ...here
* m4/qt5.m4: Move to...
* lang/qt/m4/qt5.m4: ...here
* m4/qt6.m4: Move to...
* lang/qt/m4/qt6.m4: ...here
* lang/qt/m4/ax_cxx_compile_stdcxx.m4,
lang/qt/m4/ax_gcc_func_attribute.m4, lang/qt/m4/gpg-error.m4,
lang/qt/m4/gpgme.m4, lang/qt/m4/gpgmepp.m4, lang/qt/m4/libtool.m4,
lang/qt/m4/ltoptions.m4, lang/qt/m4/ltsugar.m4,
lang/qt/m4/ltversion.m4, lang/qt/m4/lt~obsolete.m4: New.
* lang/qt/src/Makefile.am (AM_CPPFLAGS): Replace include paths of
gpgmepp and gpgme relative to top_builddir with @GPGMEPP_CFLAGS@ and
@GPGME_CFLAGS@.
(libqgpgme_la_LIBADD, libqgpgmeqt6_la_LIBADD): Replace relative paths
of libgpgmepp.la and libgpgme.la with @GPGMEPP_LIBS@ and @GPGME_LIBS@.
* lang/qt/tests/Makefile.am (EXTRA_DIST): Add new files.
(LDADD): Replace relative paths of libgpgmepp.la and libgpgme.la with
@GPGMEPP_LIBS@ and @GPGME_LIBS@.
(AM_CPPFLAGS): Replace include paths of gpgmepp and gpgme relative to
top_builddir with @GPGMEPP_CFLAGS@ and @GPGME_CFLAGS@.
(pubring-stamp): Use local copies of pubdemo.asc and secdemo.asc.
* lang/qt/tests/pubdemo.asc, lang/qt/tests/secdemo.asc,
lang/qt/tests/start-stop-agent: New.
--
This makes building and distributing QGpgME independent of the sources
of gpgme. Many of the new files are copied from gpgme to make QGpgME a
self-contained package. A later commit re-adds the possibility to build
QGpgME as nested package together with gpgme.
GnuPG-bug-id: 7110
* lang/cpp/src/Makefile.am (copied_headers): New.
(build rule for all copied headers): New.
(BUILT_SOURCES): New.
(CLEANFILES): Add copied_headers.
--
The forwarding headers make it easier to use the headers from the Qt
bindings when building them against the built but not installed C++
bindings because we can always include the C++ headers with gpgme++/
prefix.
GnuPG-bug-id: 7110
* lang/qt/doc/Makefile.am, lang/qt/tests/Makefile.am: Change license
from LGPL to GPL.
--
Both files are part of QGpgME (as lang/qt/Makefile.am and
lang/qt/src/Makefile.am). Hence, they should be licensed as other parts
of QGpgME.
* lang/qt/Makefile.am, lang/qt/src/Makefile.am: Files are part of
QGpgme. Fix wrong package name (GPGME-CL -> QGpgME). Replace references
to LGPL with references to GPL.
--
The files were already licensed under the GPL but the license headers
contained multiple (copy&paste?) errors.
* lang/qt/src/QGpgmeConfig-w32.cmake.in.in,
lang/qt/src/QGpgmeConfig.cmake.in.in,
lang/qt/src/QGpgmeConfigVersion.cmake.in: Files are part of QGpgME.
Fix copy&paste error (GPGME-CL -> QGpgME). Fix reference to license
to check for details.
* lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in,
lang/qt/src/QGpgmeQt6Config.cmake.in.in,
lang/qt/src/QGpgmeQt6ConfigVersion.cmake.in: Files are part of QGpgME.
Fix reference to license to check for details.
--
The files were already licensed under the GPL but the license headers
contained multiple (copy&paste?) errors.
* lang/qt/src/dataprovider.cpp, lang/qt/src/dataprovider.h: Change
license header from LGPL to GPL.
--
QGpgME is released under the GPL. As part of QGpgME these files (that
were originally licensed under the LGPL) are released under the GPL.
* lang/python/Makefile.am (uninstall-local): Remove installed .egg
folders.
--
Python 3.9+ install the module into a gpg-*.egg folder instead of in
"gpg" with accompanying gpg-*.egg-info file. Moreover, Python 3.9+
normalize version numbers, e.g. the version 1.24.0_beta576 is normalized
as 1.24.0b576.
* m4/python.m4: Add python3.12 and 3.11 as valid interpreters, remove
EOL 3.4, 3.5, 3.7 (keep 3.6 because some distributions still ship and
maintain it).
* lang/python/Makefile.am (clean-local): Remove dist and gpg.egg-info
created by Python 3.9+ on make install.
* lang/python/setup.py.in: switch from distutils to setuptools where
possible, remove obsolete and deprecated -py3 option of swig, add
classifiers up to 3.12, remove 3.4, 3.5, 3.7.
* lang/python/doc/src/gpgme-python-howto.org: replace distutils with
setuptools
* lang/python/examples/howto/advanced/cython/setup.py: replace distutils
with setuptools
--
This fixes building the Python bindings for Python 3.12 where distutils
has been removed.
Based on D545
* lang/cpp/src/defaultassuantransaction.h,
lang/cpp/src/gpgadduserideditinteractor.h,
lang/cpp/src/gpgagentgetinfoassuantransaction.h,
lang/cpp/src/gpggencardkeyinteractor.h,
lang/cpp/src/gpgsetexpirytimeeditinteractor.h,
lang/cpp/src/gpgsetownertrusteditinteractor.h,
lang/cpp/src/gpgsignkeyeditinteractor.h,
lang/cpp/src/interfaces/assuantransaction.h,
lang/cpp/src/interfaces/dataprovider.h,
lang/cpp/src/interfaces/statusconsumer.h,
lang/cpp/src/scdgetinfoassuantransaction.h,
lang/cpp/src/statusconsumerassuantransaction.h,
lang/cpp/src/trustitem.h: Use #include "foo.h" instead of
#include <foo.h> for own headers.
--
This fixes the build for projects that include the headers (as intended)
with #include <gpgme++/...> and that don't add the gpgme++ subdirectory
to the list of include paths for the compiler.
GnuPG-bug-id: 7110
* lang/cpp/src/gpgmefw.h (gpgme_revocation_key_t): New forward
declaration.
* lang/cpp/src/key.cpp, lang/cpp/src/key.h (class Key): New methods
revocationKey, numRevocationKeys, revocationKeys.
(class RevocationKey): New.
(swap): New overload for RevocationKey.
(operator<<): New overload for RevocationKey.
* lang/cpp/src/key.cpp (operator<<): Add information about revocation
keys to the output stream for Key.
* lang/cpp/tests/run-keylist.cpp (main): Don't output Key if nextKey
failed, e.g. at the end of the key listing.
--
GnuPG-bug-id: 7118
* lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Use
QByteArray overload of QString::fromUtf8.
--
There's no need to make the code more complicated than necessary. Unless
we want to provoke weird compiler warnings. :-)
* lang/qt/src/qgpgmeexportjob.cpp (ExportJob::exec): Return a value and
remove unused argument names.
--
ExportJob::exec is never executed because its virtual overload is always
used. Therefore it doesn't matter what value we return.
* lang/cpp/src/editinteractor.cpp (parse_sc_op_failure): New.
(CallbackHelper::edit_interactor_callback_impl): Parse failure code on
GPGME_STATUS_SC_OP_FAILURE status.
(sc_op_failure_to_error): New.
--
This converts a SC_OP_FAILURE status message logged by gpg to a
corresponding error. Unfortunately, GPG_ERR_BAD_PIN and
GPG_ERR_BAD_RESET_CODE are mapped to the same SC_OP_FAILURE code, so
that we had to choose one.
GnuPG-bug-id: 6971
* lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp
(QGpgMEAddExistingSubkeyJob::exec): Remove call of resultHook.
* lang/qt/src/qgpgmedecryptjob.cpp (QGpgMEDecryptJob::exec): Remove
call of resultHook.
(QGpgMEDecryptJob::resultHook): Remove.
* lang/qt/src/qgpgmedecryptjob.h (QGpgMEDecryptJob): Remove resultHook
override. Remove member mResult.
* lang/qt/src/qgpgmedecryptverifyjob.cpp (QGpgMEDecryptVerifyJob::exec):
Remove call of resultHook.
(QGpgMEDecryptVerifyJob::resultHook): Remove.
* lang/qt/src/qgpgmedecryptverifyjob.h (QGpgMEDecryptVerifyJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmeencryptjob.cpp (QGpgMEEncryptJob::exec): Remove
call of resultHook.
(QGpgMEEncryptJob::resultHook): Remove.
* lang/qt/src/qgpgmeencryptjob.h (QGpgMEEncryptJob): Remove resultHook
override. Remove member mResult.
* lang/qt/src/qgpgmegpgcardjob.cpp (QGpgMEGpgCardJob::exec): Remove
call of resultHook.
* lang/qt/src/qgpgmeimportfromkeyserverjob.cpp
(QGpgMEImportFromKeyserverJob::exec): Remove call of resultHook.
(QGpgMEImportFromKeyserverJob::resultHook): Remove.
* lang/qt/src/qgpgmeimportfromkeyserverjob.h
(QGpgMEImportFromKeyserverJob): Remove resultHook override. Remove
member mResult.
* lang/qt/src/qgpgmeimportjob.cpp (QGpgMEImportJob::exec): Remove call
of resultHook.
(QGpgMEImportJob::resultHook): Remove.
* lang/qt/src/qgpgmeimportjob.h (QGpgMEImportJob): Remove resultHook
override. Remove member mResult.
* lang/qt/src/qgpgmekeyformailboxjob.cpp (QGpgMEKeyForMailboxJob::exec):
Remove call of resultHook.
* lang/qt/src/qgpgmekeylistjob.cpp (QGpgMEKeyListJob::QGpgMEKeyListJob):
Remove initialization of mResult.
(QGpgMEKeyListJob::resultHook): Do not set (removed) mResult.
* lang/qt/src/qgpgmekeylistjob.h (QGpgMEKeyListJob): Remove member
mResult.
* lang/qt/src/qgpgmelistallkeysjob.cpp
(QGpgMEListAllKeysJob::QGpgMEListAllKeysJob): Remove initialization of
mResult.
(QGpgMEListAllKeysJob::exec): Remove call of resultHook.
(QGpgMEListAllKeysJob::resultHook): Remove.
* lang/qt/src/qgpgmelistallkeysjob.h (QGpgMEListAllKeysJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmereceivekeysjob.cpp (QGpgMEReceiveKeysJob::exec):
Remove call of resultHook.
(QGpgMEReceiveKeysJob::resultHook): Remove.
* lang/qt/src/qgpgmereceivekeysjob.h (QGpgMEReceiveKeysJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmerevokekeyjob.cpp (QGpgMERevokeKeyJob::exec): Remove
call of resultHook.
* lang/qt/src/qgpgmesignencryptjob.cpp (QGpgMESignEncryptJob::exec):
Remove call of resultHook.
(QGpgMESignEncryptJob::resultHook): Remove.
* lang/qt/src/qgpgmesignencryptjob.h (QGpgMESignEncryptJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmesignjob.cpp (QGpgMESignJob::exec): Remove call of
resultHook.
(QGpgMESignJob::resultHook): Remove.
* lang/qt/src/qgpgmesignjob.h (QGpgMESignJob): Remove resultHook
override. Remove member mResult.
* lang/qt/src/qgpgmeverifydetachedjob.cpp
(QGpgMEVerifyDetachedJob::exec): Remove call of resultHook.
(QGpgMEVerifyDetachedJob::resultHook): Remove.
* lang/qt/src/qgpgmeverifydetachedjob.h (QGpgMEVerifyDetachedJob):
Remove resultHook override. Remove member mResult.
* lang/qt/src/qgpgmeverifyopaquejob.cpp (QGpgMEVerifyOpaqueJob::exec):
Remove call of resultHook.
(QGpgMEVerifyOpaqueJob::resultHook): Remove.
* lang/qt/src/qgpgmeverifyopaquejob.h (QGpgMEVerifyOpaqueJob): Remove
resultHook override. Remove member mResult.
* lang/qt/src/qgpgmewkdlookupjob.cpp (QGpgMEWKDLookupJob::exec):
Remove call of resultHook.
--
All overrides of resultHook (except for the one of QGpgMEKeyListJob)
are superfluous. All the resultHook overrides do is store the result in
a member variable which is then returned in exec() (which just before
returning calls resultHook). The member variable the result is stored in
is only ever used by exec(). So exec() can simply return the result
directly. Some Job subclasses call resultHook without overriding it.
That's equally useless because the default implementation of resultHook
is empty. The only resultHook override that does anything useful is the
one of QGpgMEKeyListJob.
* lang/qt/src/qgpgmedecryptjob.cpp,
lang/qt/src/qgpgmeimportfromkeyserverjob.cpp,
lang/qt/src/qgpgmeimportjob.cpp: Remove obsolete comment.
* lang/qt/src/qgpgmekeylistjob.cpp,
lang/qt/src/qgpgmelistallkeysjob.cpp: Remove long obsolete, #if 0'ed out
definitions of showErrorDialog.
--
Informing the users about errors is the responsibility of the users of
the QGpgME Job API since a long time.
* lang/cpp/tests/run-wkdlookup.cpp (main): Replace backslashes with
forward slashes in homedir returned by GpgME::dirInfo. Use "gpgconf
--launch dirmngr" to start dirmngr.
--
With this change the same code as by QGpgMEWKDLookupJob is again used to
launch dirmngr. It also fixes the bad example of starting dirmngr
without the help of gpgconf.
GnuPG-bug-id: 6833
* lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Replace backslashes
with forward slashes in homedir returned by GpgME::dirInfo.
--
This works around a bug which causes backslashes to be escaped (doubled)
twice on Windows, once by gpgme_op_spawn and once by the spawn helper
gpgme-w32spawn. The next versions of GnuPG 2.2 and 2.4 also have a
workaround for this.
GnuPG-bug-id: 6833
* lang/qt/src/qgpgmequickjob.cpp: Fix expiration calculation
--
The job calculates the validity as the seconds since epoch,
while GPG expects the seconds since the current time.
This leads to the validity being significantly longer than expected.
GnuPG-Bug-Id: 6889
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (VerifyDetachedJob): Move definition of
constructor and destructor and inclusion of the moc file to the
corresponding .cpp file.
* lang/qt/src/verifydetachedjob.cpp: New.
* lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Add member
functions setSignatureFile, signatureFile, setSignedFile, signedFile.
* lang/qt/src/verifydetachedjob_p.h: New.
* lang/qt/src/qgpgmeverifydetachedjob.cpp (class
QGpgMEVerifyDetachedJobPrivate): New.
(QGpgMEVerifyDetachedJob::QGpgMEVerifyDetachedJob): Instantiate private
job class.
(verify_from_filename): New.
* lang/qt/tests/Makefile.am: Add new test program.
* lang/qt/tests/run-verifydetachedjob.cpp: New.
--
This makes it possible to tell gpg to read the input directly from the
specified files bypassing GpgME's Data IO when verifying a detached
signature.
GnuPG-bug-id: 6550
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (VerifyOpaqueJob): Move definition of constructor
and destructor and inclusion of the moc file to the corresponding .cpp
file.
* lang/qt/src/verifyopaquejob.cpp: New.
* lang/qt/src/verifyopaquejob.h (VerifyOpaqueJob): Add member
functions setInputFile, inputFile, setOutputFile, outputFile.
* lang/qt/src/verifyopaquejob_p.h: New.
* lang/qt/src/qgpgmeverifyopaquejob.cpp (class
QGpgMEVerifyOpaqueJobPrivate): New.
(QGpgMEVerifyOpaqueJob::QGpgMEVerifyOpaqueJob): Instantiate private
job class.
(verify_from_filename): New.
* lang/qt/tests/Makefile.am: Add new test program.
* lang/qt/tests/run-verifyopaquejob.cpp: New.
--
This makes it possible to tell gpg to read the input and write the
output directly to a specified file bypassing GpgME's Data IO when
verifying an opaque signed (or clear signed) file.
GnuPG-bug-id: 6550
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (DecryptVerifyJob): Move definition of constructor
and destructor and inclusion of the moc file to the corresponding .cpp
file.
* lang/qt/src/decryptverifyjob.cpp: New.
* lang/qt/src/decryptverifyjob.h (DecryptVerifyJob): Add member
functions setInputFile, inputFile, setOutputFile, outputFile.
* lang/qt/src/decryptverifyjob_p.h: New.
* lang/qt/src/qgpgmedecryptverifyjob.cpp (class
QGpgMEDecryptVerifyJobPrivate): New.
(QGpgMEDecryptVerifyJob::QGpgMEDecryptVerifyJob): Instantiate private
job class.
(decrypt_verify_from_filename): New.
* lang/qt/tests/Makefile.am: Add new test program.
* lang/qt/tests/run-decryptverifyjob.cpp: New.
--
This makes it possible to tell gpg to read the input and write the
output directly to a specified file bypassing GpgME's Data IO when
decrypting (and verifying) a file.
GnuPG-bug-id: 6550
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (EncryptJob, SignJob, SignEncryptJob): Move
definition of constructor and destructor and inclusion of the moc file
to the corresponding .cpp files.
* lang/qt/src/encryptjob.cpp (EncryptJob): Define constructor. Define
destructor as default. Include moc file.
* lang/qt/src/encryptjob.cpp, lang/qt/src/encryptjob.h (EncryptJob):
Add member functions setRecipients, recipients, setInputFile, inputFile,
setOutputFile, outputFile, setEncryptionFlags, encryptionFlags.
* lang/qt/src/encryptjob_p.h (EncryptJobPrivate): Add members
m_recipients, m_inputFilePath, m_outputFilePath, m_encryptionFlags.
* lang/qt/src/qgpgmeencryptjob.cpp (encrypt_to_filename): New.
(QGpgMEEncryptJobPrivate::startIt): Start the job with the values
from the member variables.
* lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt_to_filename): New.
(QGpgMESignEncryptJobPrivate::startIt): Start the job with the values
from the member variables.
* lang/qt/src/qgpgmesignjob.cpp (class QGpgMESignJobPrivate): New.
(QGpgMESignJob::QGpgMESignJob): Instantiate private job class.
(sign_to_filename): New.
* lang/qt/src/signencryptjob.cpp (SignEncryptJob): Define constructor.
Define destructor as default. Include moc file.
* lang/qt/src/signencryptjob.cpp, lang/qt/src/signencryptjob.h
(SignEncryptJob): Add member functions setSigners, signers,
setRecipients, recipients, setInputFile, inputFile, setOutputFile,
outputFile, setEncryptionFlags, encryptionFlags.
* lang/qt/src/signencryptjob_p.h (SignEncryptJobPrivate): Add members
m_signers, m_recipients, m_inputFilePath, m_outputFilePath,
m_encryptionFlags.
* lang/qt/src/signjob.cpp: New.
* lang/qt/src/signjob.h (SignJob): Add member functions setSigners,
signers, setInputFile, inputFile, setOutputFile, outputFile,
setSigningFlags, signingFlags.
* lang/qt/src/signjob_p.h: New.
* lang/qt/tests/Makefile.am: Add new test programs.
* lang/qt/tests/run-encryptjob.cpp: New.
* lang/qt/tests/run-signjob.cpp: New.
--
This makes it possible to tell gpg to read the input and write the
output directly to a specified file bypassing GpgME's Data IO when
signing and/or encrypting a file.
GnuPG-bug-id: 6550
* lang/qt/src/qgpgmeencryptjob.cpp,
lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignjob.cpp:
Remove long commented out showErrorDialog member function definitions.
--
Displaying error messages is delegated to the job users since ages.
* lang/cpp/src/context.h (enum EncryptionFlags): Add constant
EncryptFile.
* lang/cpp/src/global.h (enum SignatureMode): Add constant SignFile.
* lang/cpp/src/context.cpp (sigflags2sigflags): Handle new flag
SignFile.
(encryptflags2encryptflags): Handle new flag EncryptFile.
(operator<<): Add new flags to the corresponding debug streams.
* lang/cpp/src/signingresult.cpp (CreatedSignature::mode): Handle
new flag SignFile (even if it cannot occur).
--
GnuPG-bug-id: 6550
* lang/qt/src/defaultkeygenerationjob.h, lang/qt/src/qgpgmebackend.h,
lang/qt/src/quickjob.h, lang/qt/src/threadedjobmixin.h: Replace all
occurrences of Q_NULLPTR with nullptr.
--
* lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Use "gpgconf
--launch dirmngr" to start dirmngr.
--
Using gpgconf to start dirmngr prevents multiple instances to be started
by the concurrently running keyserver lookup and WKD lookup.
GnuPG-bug-id: 6833
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/cleaner.cpp, lang/qt/src/cleaner.h: New.
* lang/qt/src/util.cpp (PartialFileGuard::~PartialFileGuard): Call
Cleaner::removeFile instead of removeFile.
* lang/qt/src/util.cpp, lang/qt/src/util.h (removeFile): Remove.
--
If the initial attempt to remove the file fails then a Cleaner is
created that tries to remove the file at regular intervals (10 s)
and on destruction (which happens on application shutdown).
GnuPG-bug-id: 6584
* lang/qt/src/defaultkeygenerationjob.h (class DefaultKeyGenerationJob):
Deprecate.
--
GnuPG generates Ed25519 keys by default and has switched to 3072 bits as
default for RSA keys. DefaultKeyGenerationJob always generates RSA 2048
keys and uses the old parameter file API of GnuPG. It shouldn't be used
anymore.
GnuPG-bug-id: 6805
* lang/qt/src/util.h, lang/qt/src/util.cpp (class PartialFileGuard):
New.
* lang/qt/src/util.cpp (getRandomCharacters, createPartFileName): New.
* lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt_to_filename): Use
PartialFileGuard.
* lang/qt/src/qgpgmesignarchivejob.cpp (sign_to_filename): Ditto.
* lang/qt/src/qgpgmesignencryptarchivejob.cpp
(sign_encrypt_to_filename): Ditto.
--
When creating signed and/or encrypted archives, gpgtar now writes the
result to a temporary file name. On success, the archive is renamed to
the final file name. Otherwise, the (partially written) temporary file
is removed (if possible).
GnuPG-bug-id: 6721
* lang/qt/src/util.h, lang/qt/src/util.cpp (removeFile): New.
* lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt): Move removal of
output file from here
(encrypt_to_filename): ... to here and use new function.
* lang/qt/src/qgpgmesignarchivejob.cpp (sign): Move removal of output
file from here
(sign_to_filename): ... to here and use new function.
* lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt): Move
removal of output file from here
(sign_encrypt_to_filename): ... to here and use new function.
--
GnuPG-bug-id: 6721