From 26a4a4195f2a9da04bc12ae2eaa834b9db474ae7 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Thu, 7 Jan 2021 14:49:44 +0200 Subject: [PATCH] gnupg: fix patches --- packages/gnupg/common-dotlock.c.patch | 32 +++++---------------------- packages/gnupg/fix-paths.patch | 12 ---------- 2 files changed, 6 insertions(+), 38 deletions(-) diff --git a/packages/gnupg/common-dotlock.c.patch b/packages/gnupg/common-dotlock.c.patch index 76b1eaf22..70688385f 100644 --- a/packages/gnupg/common-dotlock.c.patch +++ b/packages/gnupg/common-dotlock.c.patch @@ -1,34 +1,14 @@ -Android does not support hardlinks so no need to try or nag. - -diff -u -r ../gnupg-2.2.9/common/dotlock.c ./common/dotlock.c ---- ../gnupg-2.2.9/common/dotlock.c 2017-08-28 10:22:54.000000000 +0000 -+++ ./common/dotlock.c 2018-08-05 21:40:02.699642490 +0000 -@@ -605,6 +605,9 @@ +diff -uNr gnupg-2.2.26/common/dotlock.c gnupg-2.2.26.mod/common/dotlock.c +--- gnupg-2.2.26/common/dotlock.c 2020-12-21 18:37:58.000000000 +0200 ++++ gnupg-2.2.26.mod/common/dotlock.c 2021-01-07 14:46:45.154990185 +0200 +@@ -620,6 +620,10 @@ static int use_hardlinks_p (const char *tname) { +#ifdef __ANDROID__ + return 1; -+#else ++#endif ++ char *lname; struct stat sb; unsigned int nlink; -@@ -633,6 +636,7 @@ - unlink (lname); - xfree (lname); - return res; -+#endif - } - #endif /*HAVE_POSIX_SYSTEM */ - -@@ -758,8 +762,10 @@ - } - strcpy (stpcpy (h->lockname, file_to_lock), EXTSEP_S "lock"); - UNLOCK_all_lockfiles (); -+#ifndef __ANDROID__ - if (h->use_o_excl) - my_debug_1 ("locking for '%s' done via O_EXCL\n", h->lockname); -+#endif - - return h; - diff --git a/packages/gnupg/fix-paths.patch b/packages/gnupg/fix-paths.patch index a2682c929..1a6943759 100644 --- a/packages/gnupg/fix-paths.patch +++ b/packages/gnupg/fix-paths.patch @@ -226,15 +226,3 @@ diff -uNr gnupg-2.2.13/tools/addgnupghome gnupg-2.2.13.mod/tools/addgnupghome filelist=$(find . \( -type f -o -type d \) '!' -name '*~' '!' -name . -print) -diff -uNr gnupg-2.2.13/tools/symcryptrun.c gnupg-2.2.13.mod/tools/symcryptrun.c ---- gnupg-2.2.13/tools/symcryptrun.c 2017-08-28 13:22:54.000000000 +0300 -+++ gnupg-2.2.13.mod/tools/symcryptrun.c 2019-03-02 01:32:08.673821575 +0200 -@@ -319,7 +319,7 @@ - - p = getenv ("TMPDIR"); - if (!p || !*p) -- p = "/tmp"; -+ p = "@TERMUX_PREFIX@/tmp"; - if (p[strlen (p) - 1] == '/') - name = xstrconcat (p, "gpg-XXXXXX", NULL); - else