-
Notifications
You must be signed in to change notification settings - Fork 158
Description
In #1 (comment) @agnostic-apollo suggested some additional improvements. Lets track it in this issue so it is not forgotten:
Another thing I want implemented is a blacklisted mirrors list file that is hosted on fosshost and as fallback on github as well in case its inaccessible, and file possibly signed with our key. This should contain all the mirrors that must not be used or whose domains have been freed or url sub path changed, like
bintray,packages.termux.org,kcubeterm.me, recent one, etc. This file should likely automatically be downloaded on termux app start and incrementally as well to$PREFIX/etc/apt/blacklisted-mirrors.listfile. The mirrors in these files should be checked bytermux-change-repoand excluded from showing andpkgshould exclude it too from mirrors group and switch to default mirror if none remain or single mirror is blacklisted.An additional default mirror site file should also be hosted, that is used by the app to replace any blacklisted mirror from existing
aptsources list files so that if user usesaptinstead ofpkg, then blacklisted mirrors don't get used. The default mirror should also be used bypkgscript as default.With the above, the blacklisted mirrors will be independent of whether users updates
termux-toolsor the app or has old bootstrap and we hopefully won't get any (or lower) broken mirror issues anymore. Hopefully, fosshost and github will be accessible in all countries. There is of course an ethical issue of pinging either fossthost or github continuously that could be used to track termux users, so users should explicitly opt in with a prompt. The user should also be able to disable this in termux app settings.We could also download the files in
pkgscript instead so that app doesn't need to and it doesn't ping in background and only when users wants to update, but then users that may be runningaptdirectly would still remain affected, unless we change relevantaptbinaries to a wrapper scripts or patch them to run a script at start, depending on commandinstall/update/upgrade/search.