findomain: Fix hardcoded `/etc/resolv.conf`
This commit is contained in:
parent
43f872965b
commit
e6452bc8ba
|
@ -3,8 +3,24 @@ TERMUX_PKG_DESCRIPTION="Findomain is the fastest subdomain enumerator and the on
|
|||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="8.2.1"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/Findomain/Findomain/archive/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=93c580c9773e991e1073b9b597bb7ccf77f54cebfb9761e4b1180ff97fb15bf6
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_DEPENDS="resolv-conf"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_pre_configure() {
|
||||
termux_setup_rust
|
||||
|
||||
: "${CARGO_HOME:=$HOME/.cargo}"
|
||||
export CARGO_HOME
|
||||
|
||||
cargo fetch --target "${CARGO_TARGET_NAME}"
|
||||
|
||||
for d in $CARGO_HOME/registry/src/github.com-*/trust-dns-resolver-*; do
|
||||
sed -e "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|" \
|
||||
$TERMUX_PKG_BUILDER_DIR/trust-dns-resolver.diff \
|
||||
| patch --silent -p1 -d ${d} || :
|
||||
done
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- a/src/system_conf/unix.rs
|
||||
+++ b/src/system_conf/unix.rs
|
||||
@@ -27,7 +27,7 @@
|
||||
const DEFAULT_PORT: u16 = 53;
|
||||
|
||||
pub fn read_system_conf() -> io::Result<(ResolverConfig, ResolverOpts)> {
|
||||
- read_resolv_conf("/etc/resolv.conf")
|
||||
+ read_resolv_conf("@TERMUX_PREFIX@/etc/resolv.conf")
|
||||
}
|
||||
|
||||
fn read_resolv_conf<P: AsRef<Path>>(path: P) -> io::Result<(ResolverConfig, ResolverOpts)> {
|
Loading…
Reference in New Issue