diff --git a/backport-core-Support-closefrom-also-for-glibc.patch b/backport-core-Support-closefrom-also-for-glibc.patch new file mode 100644 index 0000000000000000000000000000000000000000..56d2f62c1396ba39e384af173acbb11511be2f49 --- /dev/null +++ b/backport-core-Support-closefrom-also-for-glibc.patch @@ -0,0 +1,32 @@ +From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001 +From: Jiri Kucera +Date: Sun, 25 Jul 2021 11:35:54 +0200 +Subject: [PATCH] core: Support closefrom also for glibc. + +* src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom. +-- + +Since 2.34, glibc introduces closefrom (the implementation +follows *BSD standard). + +Signed-off-by: Werner Koch +--- + src/posix-io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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 */ +-- +1.8.3.1 + diff --git a/gpgme.spec b/gpgme.spec index 509030973512df0f451a3f09ec8ca77c3c77f95a..328e9da55b812480cbb9da7660505aed275f0e83 100644 --- a/gpgme.spec +++ b/gpgme.spec @@ -1,6 +1,6 @@ Name: gpgme Version: 1.15.1 -Release: 2 +Release: 3 Summary: GnuPG Made Easy License: GPLv2+ and LGPLv2+ URL: https://gnupg.org/related_software/gpgme/ @@ -13,6 +13,7 @@ Patch0: 0001-don-t-add-extra-libraries-for-linking.patch Patch1: gpgme-1.3.2-largefile.patch # Let's fix stupid AX_PYTHON_DEVEL Patch2: 0001-fix-stupid-ax_python_devel.patch +Patch3: backport-core-Support-closefrom-also-for-glibc.patch BuildRequires: autoconf automake gcc gcc-c++ gawk gnupg2 >= 2.1.18 BuildRequires: libgpg-error-devel >= 1.24 libassuan-devel >= 2.4.2 @@ -144,6 +145,12 @@ fi %changelog +* Tue Aug 10 2021 yixiangzhike - 1.15.1-3 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix the compilation failure with new version glibc (glibc-2.34) + * Thu Jul 22 2021 yangzhuangzhuang - 1.15.1-2 - Type:enhancement - CVE:NA