fix(main/minio): workaround for local IPs gathering
If minio unable to get all local IPs, use 127.0.0.1 as fallback. Additionally mark package as dependent on resolv-conf.
This commit is contained in:
parent
122ce95027
commit
c3a94d4682
|
@ -5,8 +5,10 @@ TERMUX_PKG_MAINTAINER="@termux"
|
|||
_DATE=2022-12-02
|
||||
_TIME=19-19-22
|
||||
TERMUX_PKG_VERSION=${_DATE//-/.}.${_TIME//-/.}
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/minio/minio/archive/refs/tags/RELEASE.${_DATE}T${_TIME}Z.tar.gz
|
||||
TERMUX_PKG_SHA256=0cc787305e317951c8c2f6de1ae14938b750817b310b75e2265195ac00244eb1
|
||||
TERMUX_PKG_DEPENDS="resolv-conf"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_pre_configure() {
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
diff -uNr minio-RELEASE.2022-12-02T19-19-22Z/cmd/net.go minio-RELEASE.2022-12-02T19-19-22Z.mod/cmd/net.go
|
||||
--- minio-RELEASE.2022-12-02T19-19-22Z/cmd/net.go 2022-12-02 21:19:22.000000000 +0200
|
||||
+++ minio-RELEASE.2022-12-02T19-19-22Z.mod/cmd/net.go 2023-01-07 15:31:24.742376643 +0200
|
||||
@@ -47,6 +47,12 @@
|
||||
// mustGetLocalIPs returns IPs of local interface
|
||||
func mustGetLocalIPs() (ipList []net.IP) {
|
||||
ifs, err := net.Interfaces()
|
||||
+
|
||||
+ if ifs == nil {
|
||||
+ ipList = append(ipList, net.IPv4(127, 0, 0, 1))
|
||||
+ return ipList
|
||||
+ }
|
||||
+
|
||||
logger.FatalIf(err, "Unable to get IP addresses of this host")
|
||||
|
||||
for _, interf := range ifs {
|
Loading…
Reference in New Issue