dog: fix path to resolv.conf

Issue https://github.com/termux/termux-packages/issues/7745
This commit is contained in:
Leonid Pliushch 2021-10-15 19:13:08 +03:00
parent 50e851aa8d
commit df91c54adb
No known key found for this signature in database
GPG Key ID: 45F2964132545795
2 changed files with 14 additions and 1 deletions

View File

@ -4,7 +4,8 @@ TERMUX_PKG_LICENSE="EUPL-1.2"
TERMUX_PKG_LICENSE_FILE="LICENCE"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.1.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/ogham/dog/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=82387d38727bac7fcdb080970e84b36de80bfe7923ce83f993a77d9ac7847858
TERMUX_PKG_DEPENDS="openssl"
TERMUX_PKG_DEPENDS="openssl, resolv-conf"
TERMUX_PKG_BUILD_IN_SRC=true

View File

@ -0,0 +1,12 @@
diff -uNr dog-0.1.0/src/resolve.rs dog-0.1.0.mod/src/resolve.rs
--- dog-0.1.0/src/resolve.rs 2020-11-07 13:54:47.000000000 +0200
+++ dog-0.1.0.mod/src/resolve.rs 2021-10-15 19:11:54.059069719 +0300
@@ -42,7 +42,7 @@
use std::io::{BufRead, BufReader};
use std::fs::File;
- let f = File::open("/etc/resolv.conf")?;
+ let f = File::open("@TERMUX_PREFIX@/etc/resolv.conf")?;
let reader = BufReader::new(f);
let mut nameservers = Vec::new();