termux / termux-tools

Scripts and small programs that are packaged into termux's termux-tools package
GNU General Public License v3.0
312 stars 72 forks source link

mirror.termux.dev: Redirection from https to 'http://...' is forbidden #47

Open truboxl opened 1 year ago

truboxl commented 1 year ago

Sometimes mirror.termux.dev returns bad redirection in the form of http.

$ pkg upg
Testing the available mirrors:
[*] (1) https://mirror.termux.dev/termux-main: ok
Picking mirror: (0) /data/data/com.termux/files/usr/etc/termux/mirrors/europe/mirror.termux.dev
Get:1 https://mirror.textcord.xyz/termux/termux-main stable InRelease [14.0 kB]
Get:2 https://mirror.textcord.xyz/termux/termux-x11 x11 InRelease [14.0 kB]
Get:3 https://mirror.textcord.xyz/termux/termux-main stable/main x86_64 Packages [501 kB]
Get:4 https://mirror.textcord.xyz/termux/termux-x11 x11/main x86_64 Packages [125 kB]
Fetched 654 kB in 12s (52.5 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
14 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  c-ares clang command-not-found curl enchant golang libcompiler-rt libcurl libheif libllvm libuv lld llvm ocl-icd
14 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 122 MB of archives.
After this operation, 61.4 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Err:7 https://mirror.termux.dev/termux-main stable/main x86_64 libcompiler-rt x86_64 16.0.4-1
  Redirection from https to 'http://mirrors.bfsu.edu.cn/termux/apt/termux-main/pool/main/libc/libcompiler-rt/libcompiler-rt_16.0.4-1_x86_64.deb' is forbidden [IP: 185.224.83.107 443]
Get:4 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 llvm x86_64 16.0.4-1 [19.6 MB]
Get:2 https://mirrors.hit.edu.cn/termux/apt/termux-main stable/main x86_64 curl x86_64 8.1.1 [196 kB]
Get:1 https://mirrors.ustc.edu.cn/termux/apt/termux-main stable/main x86_64 libcurl x86_64 8.1.1 [1008 kB]
Get:3 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 c-ares x86_64 1.19.1 [124 kB]
Get:5 https://mirrors.hit.edu.cn/termux/apt/termux-main stable/main x86_64 lld x86_64 16.0.4-1 [2372 kB]
Get:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1 [33.4 MB]
Get:8 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 libllvm x86_64 16.0.4-1 [27.0 MB]
Get:10 https://mirrors.ustc.edu.cn/termux/apt/termux-main stable/main x86_64 enchant x86_64 2.5.0 [46.7 kB]
Get:9 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 command-not-found x86_64 2.2.0-1 [94.4 kB]
Get:12 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 libheif x86_64 1.16.2 [271 kB]
Get:13 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 libuv x86_64 1.45.0-1 [79.9 kB]
Ign:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1
Get:11 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 golang x86_64 3:1.20.4-2 [35.1 MB]
Get:14 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 ocl-icd x86_64 2.3.1-3 [84.1 kB]
Get:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1 [33.4 MB]
Ign:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1
Get:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1 [33.4 MB]
Ign:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1
Get:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1 [33.4 MB]
Fetched 101 MB in 24min 19s (69.4 kB/s)
E: Failed to fetch https://mirror.termux.dev/termux-main/pool/main/libc/libcompiler-rt/libcompiler-rt_16.0.4-1_x86_64.deb  Redirection from https to 'http://mirrors.bfsu.edu.cn/termux/apt/termux-main/pool/main/libc/libcompiler-rt/libcompiler-rt_16.0.4-1_x86_64.deb' is forbidden [IP: 185.224.83.107 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
~ $ ls $PREFIX/etc/apt/
apt.conf.d  preferences.d  sources.list  sources.list.d  trusted.gpg.d
~ $ cat $PREFIX/etc/apt/sources.list
deb https://mirror.termux.dev/termux-main stable main
~ $ cat $PREFIX/etc/apt/sources.list.d/x11.list
deb https://mirror.termux.dev/termux-x11 x11 main

I checked https://github.com/termux/termux-tools/blob/master/mirrors/china/mirrors.bfsu.edu.cn and its already https. So mirror.termux.dev issue?

Duquemarx06 commented 3 months ago

~ $ ls $PREFIX/etc/apt/ apt.conf.d preferences.d sources.list sources.list.d trusted.gpg.d ~ $ cat $PREFIX/etc/apt/sources.list deb https://mirror.termux.dev/termux-main stable main ~ $ cat $PREFIX/etc/apt/sources.list.d/x11.list deb https://mirror.termux.dev/termux-x11 x11 main