You are not logged in.

#1 2022-11-19 06:38:00

mhn2
Member
Registered: 2022-11-19
Posts: 5

Problem with censorship in local mirrors

Hi, I am from Iran and the local mirrors in my country contain censorship.
I realized it today when I was trying to install the telegram-desktop package from pacman.
I would receive a 404 error from local mirrors but the package would attempt to install from the global mirrors.

These mirrors also seem to disagree so much because running `pacman -Syu` when switching to the global mirror will cause pacman to want to reinstall the almost every single package. (including the linux package)
However the local mirrors seem to be four times faster than the global mirrors for me.

Is there a way for me to make pacman use the global mirrors to determine the package versions but use the local mirrors for downloading the packages if possible?
If not, which mirrors do you suggest me to use? The local mirrors that are faster and more reliable or the global mirrors which don't contain any censorship?

(I did try putting the global mirrors after the local mirrors in `/etc/pacman.d/mirrorlist` but the 404 error wouldn't go away)

Offline

#2 2022-11-19 07:08:18

d.ALT
Member
Registered: 2019-05-10
Posts: 914

Re: Problem with censorship in local mirrors

I'm not an expert, but I can suggest you using the next nearest mirror. What about selecting EU mirrors? Can you use 'em?


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#3 2022-11-19 07:53:05

seth
Member
Registered: 2012-09-03
Posts: 49,993

Offline

#4 2022-11-19 08:09:09

mhn2
Member
Registered: 2022-11-19
Posts: 5

Re: Problem with censorship in local mirrors

d.ALT wrote:

I'm not an expert, but I can suggest you using the next nearest mirror. What about selecting EU mirrors? Can you use 'em?

The EU mirrors are as slow as the global mirrors and somehow the other middle east mirrors are even slower!

Offline

#5 2022-11-19 08:14:40

mhn2
Member
Registered: 2022-11-19
Posts: 5

Re: Problem with censorship in local mirrors

seth wrote:

https://archlinux.org/mirrors/status/ has 7 Iranian mirrors out of sync, but http://repo.iut.ac.ir/repo/archlinux/ currently syncing

The problem isn't the mirrors being out of sync, the problem is the censorship, even if the mirror that you mentioned currently contains no censorship, sooner or later it will.
If the server providers are censoring some packages, Isfahan University of Technology will definitely censor those packages as well.

Offline

#6 2022-11-19 08:37:42

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: Problem with censorship in local mirrors

The problem isn't the mirrors being out of sync

Yes, it is. Whatever the motivation behind that is irrelevant. "404" means that the mirror doesn't have the package listed in the database - it's out of sync w/ the database.
Either because you didn't update ("pacman -S verynewstuff" ./. "pacman -Syu verynewstuff") or because the mirror is out of sync.
Whether that's because it's badly maintained or your local government has daddy issues, really doesn't matter.

Offline

#7 2022-11-19 09:03:39

d.ALT
Member
Registered: 2019-05-10
Posts: 914

Re: Problem with censorship in local mirrors

seth wrote:

"404" means that the mirror doesn't have the package listed in the database - it's out of sync w/ the database.

Hey seth, but what if the package is missing due to being deleted by censorship?

I wonder if Pacman can take advantage of aria2 downloading the same package while "splitting" different connections between multiple mirrors.


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#8 2022-11-19 09:34:43

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: Problem with censorship in local mirrors

The reason why that package isn't there DOES NOT MATTER.

It's not a good idea to use an out of sync mirror, because you don't know why it's OOS, but you could fetch the database from a synced mirror, then move the questionable mirror/s on top, download packages into the local cache, move back to the synced mirrors and fetch the remaining packages and update the system.

In doubt, explicitly ignore the censored packages on the first run.

Offline

#9 2022-11-19 10:42:05

mpan
Member
Registered: 2012-08-01
Posts: 1,188
Website

Re: Problem with censorship in local mirrors

A note to everybody responding: since OP is Iranian, we are likely dealing with an actual case of proper censorship. Please take that into account. The mirrors are technically out-of-sync, but the detection mechanisms applied by Arch’s monitor and tools are inadequate to detect that.

mhn2:
For start, please follow seth’s advice regarding reflector. Do not choose mirrors by hand, it is likely to yield poor results. Trust the data. Here I composed you a list of country codes (for the `--country` option) that include all except Iran:

--country=AR,AU,AT,BD,BY,BE,BA,BR,BG,KH,CA,CL,CN,CO,HR,CZ,DK,EC,EE,FI,FR,GE,DE,GR,HK,HU,IS,IN,ID,IE,IL,IT,JP,KZ,KE,LV,LT,LU,MX,MD,MC,NL,NC,NZ,MK,NO,PK,PY,PL,PT,RO,RU,RE,RS,SG,SK,SI,ZA,KR,ES,SE,CH,TW,TH,TR,UA,GB,US,UZ,VN

I would avoid Iranian servers not only due to censorship, but also because you are leaving a clear trace you obtained the censored software.

Uncomment `ParallelDownloads` option in “/etc/pacman.conf” and set it to some number greater than 1. Don’t go too high, as some mirrors will reject you or choke. 3 is a sane value to start with. That will speed up your downloads.

If your issue is having to stare at monitor, while pacman slowly slurps packages, see pacman-contrib. The package offers checkupdates utility, which you may use to pre-download all packages:

sudo checkupdates -d

When you later run `sudo pacman -Syu`, it will only have to obtain databases and at most a few new packages.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

Board footer

Powered by FluxBB