Compare commits

..

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

3
.gitignore vendored

@ -1 +1,2 @@
SOURCES/gpgme-1.15.1.licenses.tar.bz2
SOURCES/gpgme-1.23.2.tar.bz2
SOURCES/gpgme-1.23.2.tar.bz2.sig

@ -1 +1,2 @@
29011c97c5e2a5e42234e6051f12c16660c89243 SOURCES/gpgme-1.15.1.licenses.tar.bz2
b3a938939a9fb2182684aa9ba094c8e8ecd6167b SOURCES/gpgme-1.23.2.tar.bz2
bab786f29527fddab32dc4afe57c726c7437d45d SOURCES/gpgme-1.23.2.tar.bz2.sig

@ -8,20 +8,105 @@ Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
---
m4/ax_python_devel.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
index b990d5b3..318b089c 100644
--- a/m4/ax_python_devel.m4
+++ b/m4/ax_python_devel.m4
@@ -137,7 +137,7 @@ variable to configure. See ``configure --help'' for reference.
#
AC_MSG_CHECKING([for the distutils Python package])
diff -up gpgme-1.22.0/configure.stupid gpgme-1.22.0/configure
--- gpgme-1.22.0/configure.stupid 2023-08-21 09:46:33.000000000 +0200
+++ gpgme-1.22.0/configure 2023-10-10 12:31:08.317796779 +0200
@@ -23374,7 +23374,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
AC_MSG_RESULT([yes])
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -24146,7 +24146,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -24918,7 +24918,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -25690,7 +25690,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -26462,7 +26462,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -27234,7 +27234,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -28006,7 +28006,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -28778,7 +28778,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -29550,7 +29550,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -30322,7 +30322,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
@@ -31094,7 +31094,7 @@ variable to configure. See \`\`configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
printf %s "checking for the distutils Python package... " >&6; }
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
- if test -z "$ac_distutils_result"; then
+ if test $? -eq 0; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
else
AC_MSG_RESULT([no])
--
2.12.1

@ -0,0 +1,12 @@
diff --git a/lang/python/Makefile.in b/lang/python/Makefile.in
index c0fc091..d567ecb 100644
--- a/lang/python/Makefile.in
+++ b/lang/python/Makefile.in
@@ -802,6 +802,7 @@ install-exec-local:
--build-base="$$(basename "$${PYTHON}")-gpg" \
install \
--prefix "$(DESTDIR)$(prefix)" \
+ $${SETUP_PY_EXTRA_OPTS:-} \
--verbose ; \
done

@ -0,0 +1,58 @@
diff --git a/lang/qt/tests/t-remarks.cpp b/lang/qt/tests/t-remarks.cpp
index f9a901a..4b2f2ab 100644
--- a/lang/qt/tests/t-remarks.cpp
+++ b/lang/qt/tests/t-remarks.cpp
@@ -47,6 +47,12 @@
#include "t-support.h"
+#define SKIP_ON_2_4() do { \
+ if (GpgME::engineInfo(GpgME::GpgEngine).engineVersion() >= "2.4.0") { \
+ QSKIP("The test does not work well with gnupg 2.4+."); \
+ } \
+} while (false)
+
using namespace QGpgME;
using namespace GpgME;
@@ -105,6 +111,7 @@ private Q_SLOTS:
void testRemarkReplaceSingleUIDExportable()
{
+ SKIP_ON_2_4();
if (!loopbackSupported()) {
return;
}
@@ -187,6 +194,7 @@ private Q_SLOTS:
void testMultipleRemarks()
{
+ SKIP_ON_2_4();
if (!loopbackSupported()) {
return;
}
@@ -269,6 +277,7 @@ private Q_SLOTS:
void testRemarkReplaceSingleUID()
{
+ SKIP_ON_2_4();
if (!loopbackSupported()) {
return;
}
@@ -350,6 +359,7 @@ private Q_SLOTS:
void testRemarkReplaceMultiUID()
{
+ SKIP_ON_2_4();
if (!loopbackSupported()) {
return;
}
@@ -466,6 +476,8 @@ private:
QTemporaryDir mDir;
};
+#undef SKIP_ON_2_4
+
QTEST_MAIN(TestRemarks)
#include "t-remarks.moc"

@ -1,377 +0,0 @@
From 3101e381eb7ff31138aa20438ae757365e390d2c Mon Sep 17 00:00:00 2001
From: Jiri Kucera <sanczes@gmail.com>
Date: Thu, 15 Jul 2021 22:41:37 +0200
Subject: [PATCH] lang/python/gpgme.i: Fix memleaks
---
lang/python/gpgme.i | 85 +++++++++++++++++++++++++++------------------
1 file changed, 52 insertions(+), 33 deletions(-)
diff --git a/lang/python/gpgme.i b/lang/python/gpgme.i
index 87371af8..fabf9e2c 100644
--- a/lang/python/gpgme.i
+++ b/lang/python/gpgme.i
@@ -53,7 +53,7 @@
{
encodedInput = PyUnicode_AsUTF8String($input);
if (encodedInput == NULL)
- return NULL;
+ SWIG_fail;
$1 = PyBytes_AsString(encodedInput);
}
else if (PyBytes_Check($input))
@@ -62,7 +62,7 @@
PyErr_Format(PyExc_TypeError,
"arg %d: expected str, bytes, or None, got %s",
$argnum, $input->ob_type->tp_name);
- return NULL;
+ SWIG_fail;
}
}
%typemap(freearg) const char * {
@@ -70,14 +70,16 @@
}
/* Likewise for a list of strings. */
-%typemap(in) const char *[] (void *vector = NULL,
- size_t size,
+%typemap(arginit) const char *[] {
+ $1 = NULL;
+}
+%typemap(in) const char *[] (size_t size,
PyObject **pyVector = NULL) {
/* Check if is a list */
if (PyList_Check($input)) {
size_t i, j;
size = PyList_Size($input);
- $1 = (char **) (vector = malloc((size+1) * sizeof(char *)));
+ $1 = (char **) malloc((size+1) * sizeof(char *));
pyVector = calloc(sizeof *pyVector, size);
for (i = 0; i < size; i++) {
@@ -86,12 +88,7 @@
{
pyVector[i] = PyUnicode_AsUTF8String(o);
if (pyVector[i] == NULL)
- {
- free(vector);
- for (j = 0; j < i; j++)
- Py_XDECREF(pyVector[j]);
- return NULL;
- }
+ SWIG_fail;
$1[i] = PyBytes_AsString(pyVector[i]);
}
else if (PyString_Check(o))
@@ -101,8 +98,7 @@
"arg %d: list must contain only str or bytes, got %s "
"at position %d",
$argnum, o->ob_type->tp_name, i);
- free($1);
- return NULL;
+ SWIG_fail;
}
}
$1[i] = NULL;
@@ -110,14 +106,17 @@
PyErr_Format(PyExc_TypeError,
"arg %d: expected a list of str or bytes, got %s",
$argnum, $input->ob_type->tp_name);
- return NULL;
+ SWIG_fail;
}
}
%typemap(freearg) const char *[] {
- size_t i;
- free(vector$argnum);
- for (i = 0; i < size$argnum; i++)
- Py_XDECREF(pyVector$argnum[i]);
+ if (pyVector$argnum) {
+ size_t i;
+ for (i = 0; i < size$argnum; i++)
+ Py_XDECREF(pyVector$argnum[i]);
+ free(pyVector$argnum);
+ }
+ if ($1) free($1);
}
/* Release returned buffers as necessary. */
@@ -135,7 +134,7 @@
if (!PySequence_Check($input)) {
PyErr_Format(PyExc_ValueError, "arg %d: Expected a list of gpgme_key_t",
$argnum);
- return NULL;
+ SWIG_fail;
}
if((numb = PySequence_Length($input)) != 0) {
$1 = (gpgme_key_t*)malloc((numb+1)*sizeof(gpgme_key_t));
@@ -152,8 +151,7 @@
"arg %d: list must contain only gpgme_key_ts, got %s "
"at position %d",
$argnum, pypointer->ob_type->tp_name, i);
- free($1);
- return NULL;
+ SWIG_fail;
}
Py_DECREF(pypointer);
}
@@ -179,7 +177,7 @@
pypointer = _gpg_obj2gpgme_data_t($input, $argnum, &wrapper,
&bytesio, &view);
if (pypointer == NULL)
- return NULL;
+ SWIG_fail;
have_view = !! view.obj;
/* input = $input, 1 = $1, 1_descriptor = $1_descriptor */
@@ -189,7 +187,7 @@
if ((SWIG_ConvertPtr(pypointer,(void **) &$1, $1_descriptor,
SWIG_POINTER_EXCEPTION | $disown )) == -1) {
Py_DECREF(pypointer);
- return NULL;
+ SWIG_fail;
}
Py_DECREF(pypointer);
}
@@ -347,6 +345,10 @@
}
/* Those are for gpgme_data_read() and gpgme_strerror_r(). */
+%typemap(arginit) (void *buffer, size_t size), (char *buf, size_t buflen) {
+ $1 = NULL;
+ $2 = 0;
+}
%typemap(in) (void *buffer, size_t size), (char *buf, size_t buflen) {
{
long tmp$argnum;
@@ -359,12 +361,12 @@
else
{
PyErr_SetString(PyExc_TypeError, "Numeric argument expected");
- return NULL;
+ SWIG_fail;
}
if (tmp$argnum < 0) {
PyErr_SetString(PyExc_ValueError, "Positive integer expected");
- return NULL;
+ SWIG_fail;
}
$2 = (size_t) tmp$argnum;
$1 = ($1_ltype) malloc($2+1);
@@ -373,11 +375,11 @@
%typemap(argout) (void *buffer, size_t size), (char *buf, size_t buflen) {
Py_XDECREF($result); /* Blow away any previous result */
if (result < 0) { /* Check for I/O error */
- free($1);
+ if ($1) free($1);
return PyErr_SetFromErrno(PyExc_RuntimeError);
}
$result = PyBytes_FromStringAndSize($1,result);
- free($1);
+ if ($1) free($1);
}
/* For gpgme_data_write, but should be universal. */
@@ -390,11 +392,11 @@
{
encodedInput = PyUnicode_AsUTF8String($input);
if (encodedInput == NULL)
- return NULL;
+ SWIG_fail;
if (PyBytes_AsStringAndSize(encodedInput, (char **) &$1, &ssize) == -1)
{
Py_DECREF(encodedInput);
- return NULL;
+ SWIG_fail;
}
}
else if (PyBytes_Check($input))
@@ -403,7 +405,7 @@
PyErr_Format(PyExc_TypeError,
"arg %d: expected str, bytes, or None, got %s",
$argnum, $input->ob_type->tp_name);
- return NULL;
+ SWIG_fail;
}
if (! $1)
@@ -432,8 +434,17 @@
size++;
}
$result = PyList_New(size);
+ if ($result == NULL)
+ SWIG_fail;
for (i=0,curr=$1; i<size; i++,curr=curr->next) {
PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr(curr), $1_descriptor, %newpointer_flags);
+ if (o == NULL) {
+ int j;
+ for (j = 0; j < i; j++)
+ Py_XDECREF(PyList_GetItem($result, j));
+ Py_DECREF($result);
+ SWIG_fail;
+ }
PyList_SetItem($result, i, o);
}
}
@@ -446,6 +457,8 @@
PyObject *fragile;
fragile = SWIG_NewPointerObj(SWIG_as_voidptr($1), $1_descriptor,
%newpointer_flags);
+ if (fragile == NULL)
+ SWIG_fail;
$result = _gpg_wrap_result(fragile, name);
Py_DECREF(fragile);
}
@@ -469,22 +482,28 @@ wrapresult(gpgme_vfs_mount_result_t, "VFSMountResult")
}
$result = PyList_New(size);
if ($result == NULL)
- return NULL; /* raise */
+ SWIG_fail; /* raise */
for (i=0,curr=$1; i<size; i++,curr=curr->next) {
PyObject *fragile, *o;
fragile = SWIG_NewPointerObj(SWIG_as_voidptr(curr), $1_descriptor,
%newpointer_flags);
if (fragile == NULL)
{
+ int j;
+ for (j = 0; j < i; j++)
+ Py_XDECREF(PyList_GetItem($result, j));
Py_DECREF($result);
- return NULL; /* raise */
+ SWIG_fail; /* raise */
}
o = _gpg_wrap_result(fragile, "EngineInfo");
Py_DECREF(fragile);
if (o == NULL)
{
+ int j;
+ for (j = 0; j < i; j++)
+ Py_XDECREF(PyList_GetItem($result, j));
Py_DECREF($result);
- return NULL; /* raise */
+ SWIG_fail; /* raise */
}
PyList_SetItem($result, i, o);
}
From b2815dcba2e75f79a6349191b3744952a9bd3311 Mon Sep 17 00:00:00 2001
From: Jiri Kucera <sanczes@gmail.com>
Date: Sat, 17 Jul 2021 01:12:08 +0200
Subject: [PATCH] lang/cpp/src/data.cpp: Fix memleaks
---
lang/cpp/src/data.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/lang/cpp/src/data.cpp b/lang/cpp/src/data.cpp
index 7a93cbc2..d08a29db 100644
--- a/lang/cpp/src/data.cpp
+++ b/lang/cpp/src/data.cpp
@@ -249,6 +249,7 @@ std::vector<GpgME::Key> GpgME::Data::toKeys(Protocol proto) const
}
if (gpgme_op_keylist_from_data_start (ctx->impl()->ctx, d->data, 0)) {
+ delete ctx;
return ret;
}
From eb3bf52fcb437b0508b2912f648ac25799daef55 Mon Sep 17 00:00:00 2001
From: Jiri Kucera <sanczes@gmail.com>
Date: Sat, 17 Jul 2021 01:12:45 +0200
Subject: [PATCH] src/engine-gpg.c: Fix memleaks
---
src/engine-gpg.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index b51ea173..af74714c 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -1148,6 +1148,7 @@ build_argv (engine_gpg_t gpg, const char *pgmname)
to avoid and given that we reach this here only
after a malloc failure for a small object, it is
probably better not to do anything. */
+ free_argv (argv);
return gpg_error (GPG_ERR_GENERAL);
}
/* If the data_type is FD, we have to do a dup2 here. */
@@ -1270,6 +1271,9 @@ read_status (engine_gpg_t gpg)
buffer = realloc (buffer, bufsize);
if (!buffer)
return gpg_error_from_syserror ();
+ /* Update buffer and bufsize here to prevent memory leaks. */
+ gpg->status.buffer = buffer;
+ gpg->status.bufsize = bufsize;
}
nread = _gpgme_io_read (gpg->status.fd[0],
@@ -1382,8 +1386,6 @@ read_status (engine_gpg_t gpg)
}
/* Update the gpg object. */
- gpg->status.bufsize = bufsize;
- gpg->status.buffer = buffer;
gpg->status.readpos = readpos;
return 0;
}
@@ -1423,6 +1425,9 @@ read_colon_line (engine_gpg_t gpg)
buffer = realloc (buffer, bufsize);
if (!buffer)
return gpg_error_from_syserror ();
+ /* Prevent memory leaks. */
+ gpg->colon.bufsize = bufsize;
+ gpg->colon.buffer = buffer;
}
nread = _gpgme_io_read (gpg->colon.fd[0], buffer+readpos, bufsize-readpos);
@@ -1502,8 +1507,6 @@ read_colon_line (engine_gpg_t gpg)
}
/* Update the gpg object. */
- gpg->colon.bufsize = bufsize;
- gpg->colon.buffer = buffer;
gpg->colon.readpos = readpos;
return 0;
}
From e94363045f104fe57188bd014c91462e3693ec24 Mon Sep 17 00:00:00 2001
From: Jiri Kucera <sanczes@gmail.com>
Date: Sat, 17 Jul 2021 01:14:14 +0200
Subject: [PATCH] src/engine-gpgsm.c: Fix memleaks
---
src/engine-gpgsm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c
index d5f0d7a9..7a8a049b 100644
--- a/src/engine-gpgsm.c
+++ b/src/engine-gpgsm.c
@@ -1533,8 +1533,10 @@ gpgsm_export (void *engine, const char *pattern, gpgme_export_mode_t mode,
gpgsm->output_cb.data = keydata;
err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor"
: map_data_enc (gpgsm->output_cb.data));
- if (err)
+ if (err) {
+ free (cmd);
return err;
+ }
gpgsm_clear_fd (gpgsm, INPUT_FD);
gpgsm_clear_fd (gpgsm, MESSAGE_FD);
gpgsm->inline_data = NULL;
@@ -1634,8 +1636,10 @@ gpgsm_export_ext (void *engine, const char *pattern[], gpgme_export_mode_t mode,
gpgsm->output_cb.data = keydata;
err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor"
: map_data_enc (gpgsm->output_cb.data));
- if (err)
+ if (err) {
+ free (line);
return err;
+ }
gpgsm_clear_fd (gpgsm, INPUT_FD);
gpgsm_clear_fd (gpgsm, MESSAGE_FD);
gpgsm->inline_data = NULL;

@ -1,13 +0,0 @@
diff --git a/src/posix-io.c b/src/posix-io.c
index e712ef2..2a3a81f 100644
--- a/src/posix-io.c
+++ b/src/posix-io.c
@@ -570,7 +570,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
if (fd_list[i].fd > fd)
fd = fd_list[i].fd;
fd++;
-#if defined(__sun) || defined(__FreeBSD__)
+#if defined(__sun) || defined(__FreeBSD__) || defined(__GLIBC__)
closefrom (fd);
max_fds = fd;
#else /*!__sun */

@ -0,0 +1,67 @@
diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c
index 0aa24510..c276202e 100644
--- a/src/gpgme-tool.c
+++ b/src/gpgme-tool.c
@@ -1440,7 +1440,7 @@ gt_set_keylist_mode (gpgme_tool_t gt, gpgme_keylist_mode_t keylist_mode)
gpg_error_t
gt_get_keylist_mode (gpgme_tool_t gt)
{
-#define NR_KEYLIST_MODES 6
+#define NR_KEYLIST_MODES 11
const char *modes[NR_KEYLIST_MODES + 1];
int idx = 0;
gpgme_keylist_mode_t mode = gpgme_get_keylist_mode (gt->ctx);
@@ -1455,16 +1455,23 @@ gt_get_keylist_mode (gpgme_tool_t gt)
modes[idx++] = "sig_notations";
if (mode & GPGME_KEYLIST_MODE_WITH_SECRET)
modes[idx++] = "with_secret";
+ if (mode & GPGME_KEYLIST_MODE_WITH_TOFU)
+ modes[idx++] = "with_tofu";
+ if (mode & GPGME_KEYLIST_MODE_WITH_KEYGRIP)
+ modes[idx++] = "with_keygrip";
if (mode & GPGME_KEYLIST_MODE_EPHEMERAL)
modes[idx++] = "ephemeral";
if (mode & GPGME_KEYLIST_MODE_VALIDATE)
modes[idx++] = "validate";
if (mode & GPGME_KEYLIST_MODE_FORCE_EXTERN)
modes[idx++] = "force_extern";
+ if (mode & GPGME_KEYLIST_MODE_WITH_V5FPR)
+ modes[idx++] = "with_v5fpr";
modes[idx++] = NULL;
gt_write_status (gt, STATUS_KEYLIST_MODE, modes[0], modes[1], modes[2],
- modes[3], modes[4], modes[5], modes[6], NULL);
+ modes[3], modes[4], modes[5], modes[6], modes[7], modes[8],
+ modes[9], modes[10], NULL);
return 0;
}
@@ -2188,7 +2195,8 @@ cmd_include_certs (assuan_context_t ctx, char *line)
static const char hlp_keylist_mode[] =
"KEYLIST_MODE [local] [extern] [sigs] [sig_notations]\n"
- " [ephemeral] [validate]\n"
+ " [with_secret] [with_tofu] [with_keygrip] [ephemeral]\n"
+ " [validate] [force_extern] [with_v5fpr]\n"
"\n"
"Set the mode for the next KEYLIST command.";
static gpg_error_t
@@ -2210,12 +2218,18 @@ cmd_keylist_mode (assuan_context_t ctx, char *line)
mode |= GPGME_KEYLIST_MODE_SIG_NOTATIONS;
if (strstr (line, "with_secret"))
mode |= GPGME_KEYLIST_MODE_WITH_SECRET;
+ if (strstr (line, "with_tofu"))
+ mode |= GPGME_KEYLIST_MODE_WITH_TOFU;
+ if (strstr (line, "with_keygrip"))
+ mode |= GPGME_KEYLIST_MODE_WITH_KEYGRIP;
if (strstr (line, "ephemeral"))
mode |= GPGME_KEYLIST_MODE_EPHEMERAL;
if (strstr (line, "validate"))
mode |= GPGME_KEYLIST_MODE_VALIDATE;
if (strstr (line, "force_extern"))
mode |= GPGME_KEYLIST_MODE_FORCE_EXTERN;
+ if (strstr (line, "with_v5fpr"))
+ mode |= GPGME_KEYLIST_MODE_WITH_V5FPR;
return gt_set_keylist_mode (server->gt, mode);
}

@ -0,0 +1,39 @@
diff -up gpgme-1.23.2/src/engine.c.sast_fix2 gpgme-1.23.2/src/engine.c
--- gpgme-1.23.2/src/engine.c.sast_fix2 2024-08-05 17:31:46.790089148 +0200
+++ gpgme-1.23.2/src/engine.c 2024-08-05 17:34:55.788069948 +0200
@@ -73,7 +73,7 @@ static char *engine_minimal_version;
static const char *
engine_get_file_name (gpgme_protocol_t proto)
{
- if (proto > DIM (engine_ops))
+ if (proto >= DIM (engine_ops))
return NULL;
if (engine_ops[proto] && engine_ops[proto]->get_file_name)
@@ -103,7 +103,7 @@ engine_get_home_dir (gpgme_protocol_t pr
static char *
engine_get_version (gpgme_protocol_t proto, const char *file_name)
{
- if (proto > DIM (engine_ops))
+ if (proto >= DIM (engine_ops))
return NULL;
if (engine_ops[proto] && engine_ops[proto]->get_version)
@@ -118,7 +118,7 @@ engine_get_version (gpgme_protocol_t pro
static const char *
engine_get_req_version (gpgme_protocol_t proto)
{
- if (proto > DIM (engine_ops))
+ if (proto >= DIM (engine_ops))
return NULL;
if (engine_ops[proto] && engine_ops[proto]->get_req_version)
@@ -403,7 +403,7 @@ _gpgme_set_engine_info (gpgme_engine_inf
char *new_version;
/* FIXME: Use some PROTO_MAX definition. */
- if (proto > DIM (engine_ops))
+ if (proto >= DIM (engine_ops))
return gpg_error (GPG_ERR_INV_VALUE);
while (info && info->protocol != proto)

@ -0,0 +1,86 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBFjLuq4BDACnM7zNSIaVMAacTwjXa5TGYe13i6ilHe4VL0NShzrgzjcQg531
3cRgiiiNA7OSOypMqVs73Jez6ZUctn2GVsHBrS/io9NcuC9pVwf8a61WlcEa+EtB
a3G7HlBmEWnwaUdAtWKNuAi9Xn+Ir7H2xEdksm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XPNUy6q4eOOovCW7gS7I7288NGHCa2ul8sD6vA9C4mM
4Zxaole9P9wwJe1zZFtCIy88zHM9vqv+YM9DxMCaW24+rUztr7eD4bCRdG+QlSh+
7R/TaqSxY1eAAd1J5tma9CNJO73pTKU+/JhTBGFpSqMTCSskAwMCCAEBBwIDBF6X
D9NmUQDgiyYNbhs1DMJ14mIw812wY1HVx/4QWYWiBunhrvSFxVbzsjD7/Wv+v3bm
MPrL+M2DLyFiSewNmcS0JEdudVBHLmNvbSAoUmVsZWFzZSBTaWduaW5nIEtleSAy
MDIxKYiaBBMTCABCFiEEAvON/3Mf+XywOaHaVJ5pXpBboggFAmFpSqMCGwMFCQ9x
14oFCwkIBwIDIgIBBhUKCQgLAgQWAgMBAh4HAheAAAoJEFSeaV6QW6IITkoA/RYa
jaTl1eEBU/Gdm12o3jrI55N5xZK2XTqSx25clVyjAP0XwMW/Og5+ND1ri3bAqADV
WlBDUswz8wYxsb0C4kYBkoh1BBAWCgAdFiEEbapuZKdtKEBXG0kCUoiXuCZAOtoF
AmFpTvEACgkQUoiXuCZAOtrJQAEAh7YyykjAy/Qs1yC3ji8iBfIVnPXvblrIx3SR
RyDwRC8BAKtZbEuKTtPlgkLUgMleTcZJ/vEhJE+GvfQ9o5gWCqEFiHUEEBYKAB0W
IQTB00tpIZ5K7sC6HCHj/f8hjkW3KwUCYWlPWgAKCRDj/f8hjkW3Kx4eAQDp6aGS
N/fU4xLl8RSvQUVjVA+aCTrMQR3hRwqw8liF2wEA3O3ECxz6e1+DoItYoJBBLKLw
eiInsGZ/+h5XYrpXTgA=
=4+Sn
-----END PGP PUBLIC KEY BLOCK-----

@ -1,25 +1,30 @@
%bcond_without check
## START: Set by rpmautospec
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autochangelog
## END: Set by rpmautospec
# trim changelog included in binary rpms
%global _changelog_trimtime %(date +%s -d "1 year ago")
%bcond check 1
# No Qt5 on RHEL 10 and higher
%bcond qt5 %[ 0%{?rhel} < 10 ]
%bcond qt6 1
%global gnupg2_min_ver 2.2.24
%global libgpg_error_min_ver 1.36
# we are doing out of source build
%global _configure ../configure
Name: gpgme
Summary: GnuPG Made Easy - high level crypto API
Version: 1.15.1
Version: 1.23.2
Release: 6%{?dist}
# /usr/bin/gpgme-tool is licensed under GPLv3+
# the rest is licensed under LGPLv2+
# Note: /usr/bin/gpgme-json contains bits of MIT licensed code, but its
# effective license remains LGPLv2+
# (see https://fedoraproject.org/wiki/Licensing:FAQ)
License: LGPLv2+ and GPLv3+
# MIT: src/cJSON.{c,h} (used by gpgme-json)
License: LGPL-2.1-or-later AND MIT
URL: https://gnupg.org/related_software/gpgme/
#Source0: https://gnupg.org/ftp/gcrypt/gpgme/gpgme-%%{version}.tar.bz2
Source0: gpgme-%{version}.licenses.tar.bz2
Source0: https://gnupg.org/ftp/gcrypt/gpgme/gpgme-%{version}.tar.bz2
Source1: https://gnupg.org/ftp/gcrypt/gpgme/gpgme-%{version}.tar.bz2.sig
Source3: https://gnupg.org/signature_key.asc
Source2: gpgme-multilib.h
## downstream patches
@ -29,17 +34,24 @@ Patch1001: 0001-don-t-add-extra-libraries-for-linking.patch
Patch1002: gpgme-1.3.2-largefile.patch
# Let's fix stupid AX_PYTHON_DEVEL
Patch1003: 0001-fix-stupid-ax_python_devel.patch
# Fix static analysis issues
Patch1004: gpgme-1.15.1-covscan.patch
# glibc 2.34 introduces closefrom()
Patch1005: gpgme-1.15.1-glibc-closefrom.patch
# Allow extra options to be passed to setup.py during installation
Patch1004: 0002-setup_py_extra_opts.patch
# from upstream for gpgme <= 1.23.2 fix sast issue #RHEL-44468
Patch1005: gpgme-1.23.2-sast_fix1.patch
# second part of sast fix, not yet upstream atm, #RHEL-44468
Patch1006: gpgme-1.23.2-sast_fix2.patch
## temporary downstream fixes
# Skip lang/qt/tests/t-remarks on gnupg 2.4+
Patch3001: 1001-qt-skip-test-remarks-for-gnupg2-2.4.patch
#BuildRequires: autoconf
#BuildRequires: automake
BuildRequires: make
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gawk
BuildRequires: texinfo
BuildRequires: gnupg2 >= %{gnupg2_min_ver}
BuildRequires: gnupg2-smime
BuildRequires: libgpg-error-devel >= %{libgpg_error_min_ver}
@ -90,38 +102,73 @@ Provides: gpgme-pp-devel = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: gpgme-pp-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}pp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}-devel%{?_isa}
# For automatic provides
BuildRequires: cmake
%description -n %{name}pp-devel
%{summary}
%package -n q%{name}
Summary: Qt API bindings/wrapper for GPGME
%if %{with qt5}
%package -n q%{name}-qt5
Summary: Qt5 API bindings/wrapper for GPGME
Requires: %{name}pp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Test)
Obsoletes: q%{name} < 1.20.0
Provides: q%{name}
%description -n q%{name}
%description -n q%{name}-qt5
%{summary}.
%endif
%package -n q%{name}-devel
Summary: Development libraries and header files for %{name}
%if %{with qt6}
%package -n q%{name}-qt6
Summary: Qt6 API bindings/wrapper for GPGME
Requires: %{name}pp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Test)
%description -n q%{name}-qt6
%{summary}.
%endif
%if %{with qt5} || %{with qt6}
%package -n q%{name}-common-devel
Summary: Common development header files for %{name}-qt5 and %{name}-qt6
Requires: %{name}pp-devel%{?_isa}
%description -n q%{name}-common-devel
%{summary}.
%endif
%if %{with qt5}
%package -n q%{name}-qt5-devel
Summary: Development libraries and header files for %{name}-qt5
# before libqgpgme.so symlink was moved to avoid conflict
Conflicts: kdepimlibs-devel < 4.14.10-17
Requires: q%{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}pp-devel%{?_isa}
# For automatic provides
BuildRequires: cmake
Requires: q%{name}-qt5%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: q%{name}-common-devel%{?_isa}
Obsoletes: q%{name}-devel < 1.20.0
Provides: q%{name}-devel = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: q%{name}-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description -n q%{name}-qt5-devel
%{summary}.
%endif
%description -n q%{name}-devel
%if %{with qt6}
%package -n q%{name}-qt6-devel
Summary: Development libraries and header files for %{name}-qt6
Requires: q%{name}-qt6%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: q%{name}-common-devel%{?_isa}
%description -n q%{name}-qt6-devel
%{summary}.
%endif
%package -n python3-gpg
Summary: %{name} bindings for Python 3
%{?python_provide:%python_provide python3-gpg}
BuildRequires: python3-devel
# Needed since Python 3.12+ drops distutils
BuildRequires: python3-setuptools
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: platform-python-gpg < %{version}-%{release}
@ -130,6 +177,8 @@ Obsoletes: platform-python-gpg < %{version}-%{release}
%prep
%autosetup -p1
gpg2 --import --import-options import-export,import-minimal %{SOURCE3} > ./gpg-keyring.gpg
gpgv2 --keyring ./gpg-keyring.gpg %{SOURCE1} %{SOURCE0}
## HACK ALERT
# The config script already suppresses the -L if it's /usr/lib, so cheat and
@ -143,11 +192,51 @@ sed -i 's/3.8/%{python3_version}/g' configure
%build
# People neeed to learn that you can't run autogen.sh anymore
#./autogen.sh
%configure --disable-static --disable-silent-rules --enable-languages=cpp,qt,python
# Since 1.16.0, we need to explicitly pass -D_LARGEFILE_SOURCE and
# -D_FILE_OFFSET_BITS=64 for the QT binding to build successfully on 32-bit
# platforms.
export CFLAGS='%{optflags} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
export CXXFLAGS='%{optflags} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
# Explicit new lines in C(XX)FLAGS can break naive build scripts
export CFLAGS="$(echo ${CFLAGS} | tr '\n\\' ' ')"
export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')"
export SETUPTOOLS_USE_DISTUTILS=local
#export PYTHON=%{python3}
#export PYTHON_VERSION=%{python3_version}
# Also build either qt5 or qt6
mkdir build
pushd build
%configure --disable-static --disable-silent-rules --enable-languages=cpp,%{?with_qt5:qt,}%{!?with_qt5:%{?with_qt6:qt6,}}python
%make_build
popd
# Build qt6 in extra step if qt5 has been build
%if %{with qt5} && %{with qt6}
mkdir build-qt6
pushd build-qt6
%configure --disable-static --disable-silent-rules --enable-languages=cpp,qt6,python
%make_build
popd
%endif
%install
# When using distutils from setuptools 60+, ./setup.py install use
# the .egg format. This forces setuptools to use .egg-info format.
# SETUP_PY_EXTRA_OPTS is introduced by the Patch1004 above.
export SETUPTOOLS_USE_DISTUTILS=local
export SETUP_PY_EXTRA_OPTS="--single-version-externally-managed --root=/"
# Aliso install either qt5 or qt6
pushd build
%make_install
popd
# Install qt6 in extra step if qt5 has been installed
%if %{with qt5} && %{with qt6}
pushd build-qt6
%make_install
popd
%endif
# unpackaged files
rm -fv %{buildroot}%{_infodir}/dir
@ -168,7 +257,14 @@ install -m644 -p -D %{SOURCE2} %{buildroot}%{_includedir}/gpgme.h
chrpath -d %{buildroot}%{_bindir}/%{name}-tool
chrpath -d %{buildroot}%{_bindir}/%{name}-json
chrpath -d %{buildroot}%{_libdir}/lib%{name}pp.so*
# qt5
%if %{with qt5}
chrpath -d %{buildroot}%{_libdir}/libq%{name}.so*
%endif
# qt6
%if %{with qt6}
chrpath -d %{buildroot}%{_libdir}/libq%{name}qt6.so*
%endif
# autofoo installs useless stuff for uninstall
rm -vf %{buildroot}%{python2_sitelib}/gpg/install_files.txt
@ -176,7 +272,9 @@ rm -vf %{buildroot}%{python3_sitelib}/gpg/install_files.txt
%if %{with check}
%check
pushd build
make check
popd
%endif
%files
@ -207,36 +305,102 @@ make check
%{_libdir}/lib%{name}pp.so
%{_libdir}/cmake/Gpgmepp/
%files -n q%{name}
%if %{with qt5}
%files -n q%{name}-qt5
%doc lang/qt/README
%{_libdir}/libq%{name}.so.7*
%{_libdir}/libq%{name}.so.15*
%endif
%files -n q%{name}-devel
%if %{with qt6}
%files -n q%{name}-qt6
%{_libdir}/libq%{name}qt6.so.15*
%endif
%if %{with qt5} || %{with qt6}
%files -n q%{name}-common-devel
%{_includedir}/q%{name}/
%{_includedir}/QGpgME/
%endif
%if %{with qt5}
%files -n q%{name}-qt5-devel
%{_libdir}/libq%{name}.so
%{_libdir}/cmake/QGpgme/
%endif
%if %{with qt6}
%files -n q%{name}-qt6-devel
%{_libdir}/libq%{name}qt6.so
%{_libdir}/cmake/QGpgmeQt6/
%endif
%files -n python3-gpg
%doc lang/python/README
%{python3_sitearch}/gpg-*.egg-info
%{python3_sitearch}/gpg-*.egg-info/
%{python3_sitearch}/gpg/
%changelog
* Thu Feb 17 2022 Jiri Kucera <jkucera@redhat.com> - 1.15.1-6
- Rebuild
Resolves: #2035319
## START: Generated by rpmautospec
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.23.2-8
- Bump release for October 2024 mass rebuild:
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.23.2-7
- Rebuilt for MSVSphere 10
* Thu Aug 08 2024 Evgeny Fedin <efedin@redhat.com> - 1.23.2-7
- Related: RHELMISC-3914 - fix plan definition
* Mon Aug 05 2024 Michal Hlavinka <mhlavink@redhat.com> - 1.23.2-6
- fix static analysis findings (RHEL-44568)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.15.1-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jul 26 2024 Evgeny Fedin <efedin@redhat.com> - 1.23.2-5
- Related: RHELMISC-3914 - add gating.yaml file
* Fri Jul 16 2021 Jiri Kucera <jkucera@redhat.com> - 1.15.1-4
- Fix license and covscan issues
Resolves: #1938732
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.23.2-4
- Bump release for June 2024 mass rebuild
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.15.1-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Sat Jan 13 2024 Marie Loise Nolden <loise@kde.org> - 1.23.2-2
- add signature file
* Sat Jan 13 2024 Marie Loise Nolden <loise@kde.org> - 1.23.2-1
- Update to 1.23.2
* Wed Oct 11 2023 Michal Hlavinka <mhlavink@redhat.com> - 1.22.0-2
- add tarball signature verification
* Tue Oct 10 2023 Michal Hlavinka <mhlavink@redhat.com> - 1.22.0-1
- updated to 1.22.0
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 27 2023 Python Maint <python-maint@redhat.com> - 1.20.0-4
- Rebuilt for Python 3.12
* Mon Jun 26 2023 Jiri Kucera <jkucera@redhat.com> - 1.20.0-3
- Drop unused patches
* Mon Jun 26 2023 Jiri Kucera <jkucera@redhat.com> - 1.20.0-2
- Build only Qt6 on RHEL
* Fri Jun 16 2023 FAS Marie Loise Nolden <loise@kde.org> - 1.20.0-1
- update to 1.20.0 and enable qt6 build
* Fri Jun 16 2023 Marie Loise Nolden <loise@kde.org> - 1.20.0-1
- Update to 1.20.0 and enable/add qt6 build for qgpgme. The qt5 and qt6
rpms have been split out into separate libs and -devel rpms for compatibility.
* Tue Nov 02 2021 Frantisek Sumsal <frantisek@sumsal.cz> - 1.15.1-6
- Fix build with glibc >=2.34 (RHBZ#1984691, RHBZ#1987561)
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1.15.1-4
- Rebuilt for Python 3.10
* Wed Jun 02 2021 Miro Hrončok <mhroncok@redhat.com> - 1.15.1-3
- Also remove RPATH from /usr/bin/gpgme-json
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
@ -602,3 +766,5 @@ make check
* Sat Feb 8 2003 Ville Skyttä <ville.skytta at iki.fi> - 0.4.0-1.fedora.1
- First Fedora release.
## END: Generated by rpmautospec

Loading…
Cancel
Save