gnupg: fix patches

This commit is contained in:
Leonid Pliushch 2021-01-07 14:49:44 +02:00
parent 9dd7077f66
commit 26a4a4195f
No known key found for this signature in database
GPG Key ID: 45F2964132545795
2 changed files with 6 additions and 38 deletions

View File

@ -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;

View File

@ -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