diff --git a/0001-core-Support-closefrom-also-for-glibc.patch b/0001-core-Support-closefrom-also-for-glibc.patch new file mode 100644 index 0000000..8b12c17 --- /dev/null +++ b/0001-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 e712ef28..2a3a81fc 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 */ +-- +2.11.0 + diff --git a/4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch b/4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch deleted file mode 100644 index 8b12c17..0000000 --- a/4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch +++ /dev/null @@ -1,32 +0,0 @@ -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 e712ef28..2a3a81fc 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 */ --- -2.11.0 - diff --git a/gpgme.spec b/gpgme.spec index dd0b802..ff52acf 100644 --- a/gpgme.spec +++ b/gpgme.spec @@ -5,14 +5,18 @@ Name: gpgme Summary: GnuPG Made Easy - high level crypto API -Version: 1.15.1 +Version: 1.16.0 Release: %autorelease -License: LGPLv2+ +# MIT: src/cJSON.{c,h} (used by gpgme-json) +License: LGPLv2+ and MIT URL: https://gnupg.org/related_software/gpgme/ Source0: https://gnupg.org/ftp/gcrypt/gpgme/gpgme-%{version}.tar.bz2 Source2: gpgme-multilib.h +# Fix build with glibc >=2.34 +Patch0001: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=patch;h=4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e#/0001-core-Support-closefrom-also-for-glibc.patch + ## downstream patches # Don't add extra libs/cflags in gpgme-config/cmake equivalent Patch1001: 0001-don-t-add-extra-libraries-for-linking.patch @@ -20,9 +24,6 @@ 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 build with glibc >=2.34 -# See: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e -Patch1004: 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch #BuildRequires: autoconf #BuildRequires: automake @@ -169,7 +170,7 @@ make check %endif %files -%license COPYING* +%license COPYING* LICENSES %doc AUTHORS NEWS README* %{_bindir}/%{name}-json %{_libdir}/lib%{name}.so.11* diff --git a/sources b/sources index 99b29fe..0d27909 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gpgme-1.15.1.tar.bz2) = 1d75a848cce6389f7cb8896b57a28dfe1dc5a447bfb4f128b0994a43e04134343400a3be063e971f03dfd595474cfd558519741d5d56afb3e84853ad4f2a45c2 +SHA512 (gpgme-1.16.0.tar.bz2) = 69487be69612e9bf0221ff56ae687248bd13635db1b7087130e93c1670e38f3c810bbca17723555c04fe207976c35871bbc3da005179ce099504321cf33636e4