termux-pacman / glibc-packages

Glibc packages for termux
MIT License
134 stars 19 forks source link

[Bug]: Missing the $PREFIX/glibc/etc/hosts file #196

Closed djndl1 closed 9 months ago

djndl1 commented 9 months ago

Problem description

As the title says, the glibc environment is missing the host file and localhost fails to resolve to 127.0.0.1. A symlink to the host file in the bionic environment would easily solve the issue. I find it strange that the openssl-glibc package, instead of a seperate package, links resolve.conf to the glibc environment. Probably a separate configuration package should be there to set up these files.

System information

termux-info:

Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=3963
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-x11 x11 main
# glibc-repo (sources.list.d/glibc.list)
deb https://packages-cf.termux.dev/apt/termux-glibc/ glibc stable
Updatable packages:
command-not-found/stable 2.4.0-10 aarch64 [upgradable from: 2.4.0-9]
python-pip/stable 24.0-1 all [upgradable from: 23.3.2]
sdl2/x11 2.30.0 aarch64 [upgradable from: 2.28.5-1]
termux-tools version:
1.40.5
Android version:
11
Kernel build information:
Linux localhost 4.14.186-g7c18952d3c68 #1 SMP PREEMPT Thu Jun 2 19:52:17 CST 2022 aarch64 GNU/Linux
Device manufacturer:
Xiaomi
Device model:
Redmi Note 8 Pro
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=
Maxython commented 9 months ago

As the title says, the glibc environment is missing the host file and localhost fails to resolve to 127.0.0.1. A symlink to the host file in the bionic environment would easily solve the issue.

Ok, this will be solved by updating openssl-glibc.

I find it strange that the openssl-glibc package, instead of a seperate package, links resolve.conf to the glibc environment. Probably a separate configuration package should be there to set up these files.

This was implemented because there is no point in creating a separate resolv-conf-glibc package, which would have the same configuration as a regular resolv-conf.