From eff385324c1aebac3711e0648cb8fbd9b6e5d512 Mon Sep 17 00:00:00 2001 From: rsteube Date: Sun, 27 Oct 2024 20:42:00 +0100 Subject: [PATCH] termux: fix path --- termux/1-hardcoded-etc-resolv-conf/patch.diff | 6 +++--- termux/3-src-crypto-x509-root_linux.go/patch.diff | 2 +- termux/4-src-os-file_unix.go.patch/patch.diff | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/termux/1-hardcoded-etc-resolv-conf/patch.diff b/termux/1-hardcoded-etc-resolv-conf/patch.diff index 9f8d075..6035ed9 100644 --- a/termux/1-hardcoded-etc-resolv-conf/patch.diff +++ b/termux/1-hardcoded-etc-resolv-conf/patch.diff @@ -25,7 +25,7 @@ switch c.mdnsTest { case mdnsFromSystem: - _, err := os.Stat("/etc/mdns.allow") -+ _, err := os.Stat("/data/data/com.termux/files/etc/mdns.allow") ++ _, err := os.Stat("/data/data/com.termux/files/usr/etc/mdns.allow") if err != nil && !errors.Is(err, fs.ErrNotExist) { // Let libc figure out what is going on. return hostLookupCgo, dnsConf @@ -56,7 +56,7 @@ func getSystemDNSConfig() *dnsConfig { - resolvConf.tryUpdate("/etc/resolv.conf") -+ resolvConf.tryUpdate("/data/data/com.termux/files/etc/resolv.conf") ++ resolvConf.tryUpdate("/data/data/com.termux/files/usr/etc/resolv.conf") return resolvConf.dnsConfig.Load() } @@ -65,7 +65,7 @@ // Set dnsConfig and lastChecked so we don't parse // resolv.conf twice the first time. - conf.dnsConfig.Store(dnsReadConfig("/etc/resolv.conf")) -+ conf.dnsConfig.Store(dnsReadConfig("/data/data/com.termux/files/etc/resolv.conf")) ++ conf.dnsConfig.Store(dnsReadConfig("/data/data/com.termux/files/usr/etc/resolv.conf")) conf.lastChecked = time.Now() // Prepare ch so that only one update of resolverConfig may diff --git a/termux/3-src-crypto-x509-root_linux.go/patch.diff b/termux/3-src-crypto-x509-root_linux.go/patch.diff index 4b6f676..ecc070f 100644 --- a/termux/3-src-crypto-x509-root_linux.go/patch.diff +++ b/termux/3-src-crypto-x509-root_linux.go/patch.diff @@ -6,7 +6,7 @@ index 8e79ccb..1176471 100644 // Possible certificate files; stop after finding one. var certFiles = []string{ -+ "/data/data/com.termux/files/etc/tls/cert.pem", // Termux ++ "/data/data/com.termux/files/usr/etc/tls/cert.pem", // Termux "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc. "/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL 6 "/etc/ssl/ca-bundle.pem", // OpenSUSE diff --git a/termux/4-src-os-file_unix.go.patch/patch.diff b/termux/4-src-os-file_unix.go.patch/patch.diff index e4ed3de..0212de0 100644 --- a/termux/4-src-os-file_unix.go.patch/patch.diff +++ b/termux/4-src-os-file_unix.go.patch/patch.diff @@ -7,7 +7,7 @@ index a527b23..3a302f9 100644 if dir == "" { if runtime.GOOS == "android" { - dir = "/data/local/tmp" -+ dir = "/data/data/com.termux/files/tmp" ++ dir = "/data/data/com.termux/files/usr/tmp" } else { dir = "/tmp" }