Browse Source

dirmngr: Patch etc/resolv.conf path (fixes #1027)

android-5
Fredrik Fornwall 8 years ago
parent
commit
4b971e5287
  1. 1
      packages/gnupg2/build.sh
  2. 33
      packages/gnupg2/dirmngr-dns.patch
  3. 2
      packages/gnupg2/dirmngr.subpackage.sh

1
packages/gnupg2/build.sh

@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://www.gnupg.org/ TERMUX_PKG_HOMEPAGE=https://www.gnupg.org/
TERMUX_PKG_DESCRIPTION="Implementation of the OpenPGP standard for encrypting and signing data and communication" TERMUX_PKG_DESCRIPTION="Implementation of the OpenPGP standard for encrypting and signing data and communication"
TERMUX_PKG_VERSION=2.1.21 TERMUX_PKG_VERSION=2.1.21
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_SRCURL=https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=7aead8a8ba75b69866f583b6c747d91414d523bfdfbe9a8e0fe026b16ba427dd TERMUX_PKG_SHA256=7aead8a8ba75b69866f583b6c747d91414d523bfdfbe9a8e0fe026b16ba427dd
TERMUX_PKG_DEPENDS="libassuan,libbz2,libgcrypt,libksba,libnpth,readline,pinentry" TERMUX_PKG_DEPENDS="libassuan,libbz2,libgcrypt,libksba,libnpth,readline,pinentry"

33
packages/gnupg2/dirmngr-dns.patch

@ -0,0 +1,33 @@
diff -u -r ../gnupg-2.1.21/dirmngr/dns.c ./dirmngr/dns.c
--- ../gnupg-2.1.21/dirmngr/dns.c 2017-05-15 14:13:22.000000000 +0200
+++ ./dirmngr/dns.c 2017-05-18 14:02:06.625275461 +0200
@@ -5414,7 +5414,7 @@
if (!(resconf = dns_resconf_open(&error)))
goto error;
- if ((error = dns_resconf_loadpath(resconf, "/etc/resolv.conf"))) {
+ if ((error = dns_resconf_loadpath(resconf, "@TERMUX_PREFIX@/etc/resolv.conf"))) {
/*
* NOTE: Both the glibc and BIND9 resolvers ignore a missing
* /etc/resolv.conf, defaulting to a nameserver of
@@ -10211,7 +10211,7 @@
panic("dns_resconf_open: %s", dns_strerror(error));
if (!MAIN.resconf.count)
- MAIN.resconf.path[MAIN.resconf.count++] = "/etc/resolv.conf";
+ MAIN.resconf.path[MAIN.resconf.count++] = "@TERMUX_PREFIX@/etc/resolv.conf";
for (i = 0; i < MAIN.resconf.count; i++) {
path = MAIN.resconf.path[i];
diff -u -r ../gnupg-2.1.21/dirmngr/dns-stuff.c ./dirmngr/dns-stuff.c
--- ../gnupg-2.1.21/dirmngr/dns-stuff.c 2017-05-15 14:13:22.000000000 +0200
+++ ./dirmngr/dns-stuff.c 2017-05-18 14:02:29.025024667 +0200
@@ -496,7 +496,7 @@
#else /* Unix */
const char *fname;
- fname = "/etc/resolv.conf";
+ fname = "@TERMUX_PREFIX@/etc/resolv.conf";
err = libdns_error_to_gpg_error
(dns_resconf_loadpath (ld.resolv_conf, fname));
if (err)

2
packages/gnupg2/dirmngr.subpackage.sh

@ -1,3 +1,3 @@
TERMUX_SUBPKG_INCLUDE="bin/dirmngr bin/dirmngr-client share/man/man8/dirmngr.8 share/man/man1/dirmngr-client.1" TERMUX_SUBPKG_INCLUDE="bin/dirmngr bin/dirmngr-client share/man/man8/dirmngr.8 share/man/man1/dirmngr-client.1"
TERMUX_SUBPKG_DESCRIPTION="Server for managing certificate revocation lists" TERMUX_SUBPKG_DESCRIPTION="Server for managing certificate revocation lists"
TERMUX_SUBPKG_DEPENDS="gnupg2, libgnutls" TERMUX_SUBPKG_DEPENDS="gnupg2, libgnutls, resolv-conf"

Loading…
Cancel
Save