Postez ici vos trucs & astuces.
Répondre

Une mirrorlist Custom

#1Messageil y a 10 ans

ÉDIT DU 03/07/2013 Suite à une mise à jour avec des dépôts non complètement synchronisés j'ai eu quelques problèmes et je soupcçonne la mirrorlist générée avec Custom d'en être en partie la cause. Donc dans le doute je déconseille cette solution et préconise éventuellement; si on sait ce que l'on fait, d'utiliser la solution Pamir viewtopic.php?f=28&t=1814&p=20123&hilit=pamir#p19819
=============================================================


Suite au poste de philm sur le forum anglophone et à la création de la page sur le wiki
http://wiki.manjaro.org/index.php?title=Create_your_own_Custom_Mirrorlist
j'ai décidé de mettre en pratique cette configuration.

Je voulais les Mirrors de France, Netherlands, United_Kingdom, Germany.
Donc pour chaque pays je vais récupérer les références des mirroirs dans différents fichiers list suivis d'un numéro, puis récupérer le tout pour mon fichier /etc/pacman.d/mirrors/Custom puis configurer le fichier /etc/pacman-mirrors.conf et enfin lancer pacman-mirrors -g

Procédure détaillée des commandes passées en root :

#  cd /tmp/
#  pacman-mirrors -g -c France -o list1

#  pacman-mirrors -g -c Netherlands -o list2

#  pacman-mirrors -g -c United_Kingdom -o list3

#  pacman-mirrors -g -c germany -o list4


On vérifie le résultat de tous les fichiers list* et la sortie de la commande va nous servir à configurer le fichier /etc/pacman.d/mirrors/Custom :

#  egrep -h "Server" list*
Server = http://manjarolinux.polymorf.fr/stable/$repo/$arch
Server = http://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
Server = http://www.mirrorservice.org/sites/repo.manjaro.org/repos/stable/$repo/$arch
Server = http://mirror.catn.com/pub/manjaro/stable/$repo/$arch
Server = http://manjaro.mirrors.uk2.net/stable/$repo/$arch
Server = http://repo.manjaro.org.uk/stable/$repo/$arch
Server = http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/$repo/$arch
Server = http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch
Server = http://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch


#  nano -w /etc/pacman.d/mirrors/Custom

et je recopie le résultat de la commande précédente pour au final avoir :

> cat /etc/pacman.d/mirrors/Custom 
##
## Pacman Mirrorlist
##
[Custom]
Server = http://manjarolinux.polymorf.fr/stable/$repo/$arch
Server = http://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
Server = http://www.mirrorservice.org/sites/repo.manjaro.org/repos/stable/$repo/$arch
Server = http://mirror.catn.com/pub/manjaro/stable/$repo/$arch
Server = http://manjaro.mirrors.uk2.net/stable/$repo/$arch
Server = http://repo.manjaro.org.uk/stable/$repo/$arch
Server = http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/$repo/$arch
Server = http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch
Server = http://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch

puis on continue par l'édition de /etc/pacman-mirrors.conf

#  nano -w /etc/pacman-mirrors.conf

et je décommente la ligne OnlyCountry= pour au final avoir :
OnlyCountry=Custom

On lance la commande :

#  pacman-mirrors -g
:: Querying servers, this may take some time...
:: Only country: Custom
 -> 0.496 http://manjarolinux.polymorf.fr/stable/$repo/$arch
 -> 0.347 http://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
 -> unreachable http://www.mirrorservice.org/sites/repo.manjaro.org/repos/stable/$repo/$arch
 -> unreachable http://mirror.catn.com/pub/manjaro/stable/$repo/$arch
 -> 0.353 http://manjaro.mirrors.uk2.net/stable/$repo/$arch
 -> 0.398 http://repo.manjaro.org.uk/stable/$repo/$arch
 -> unreachable http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/$repo/$arch
 -> 0.679 http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch
 -> 0.699 http://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch
:: Generated and saved '/etc/pacman.d/mirrorlist' mirrorlist.

On vérifie le résultat :

#  egrep -h "Loca|Server" /etc/pacman.d/mirrorlist
## Location: Custom
Server = http://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
## Location: Custom
Server = http://manjaro.mirrors.uk2.net/stable/$repo/$arch
## Location: Custom
Server = http://repo.manjaro.org.uk/stable/$repo/$arch
## Location: Custom
Server = http://manjarolinux.polymorf.fr/stable/$repo/$arch
## Location: Custom
Server = http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch
## Location: Custom
Server = http://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch


Ne reste plus qu'à lancer un pacman -Syy
Dernière modification par cepil y a 10 ans, modifié au total 2 fois.

Une mirrorlist Custom

#2Messageil y a 10 ans

Bonjour :bjr:

Excellent :clap

Que dirais-tu de t'occuper de faire la page française du wiki ?

Une mirrorlist Custom

#3Messageil y a 10 ans

Salut ewolnux,
J'ai pensé à le mettre en effet sur le wiki.
Écoute, on voit ici si certains pensent qu'il y a des corrections, ajouts, ou modifications à faire, pendant ce temps je regarde un peu comment fonctionne le wiki et ensuite ok, je transpose.

Une mirrorlist Custom

#4Messageil y a 10 ans

Une mirrorlist Custom

#5Messageil y a 10 ans

cep a écrit :Salut ewolnux,
J'ai pensé à le mettre en effet sur le wiki.
Écoute, on voit ici si certains pensent qu'il y a des corrections, ajouts, ou modifications à faire, pendant ce temps je regarde un peu comment fonctionne le wiki et ensuite ok, je transpose.

pour moi aucune correction, et je trouve ça très astucieux et propre, de faire passer custom comme un nouveau pays...

Une mirrorlist Custom

#6Messageil y a 10 ans

En effet, astucieux le coup de Custom.
Ok pour le wiki, j'ai ouvert un compte et ferai la page bientôt.

Une mirrorlist Custom

#7Messageil y a 10 ans

Petite proposition :

j'ai légèrement modifié ton tuto, disons clarifié la création/contenu du fichier Custom. Je pense que c'est un poil plus clair.

Procédure détaillée des commandes passées en root :

#  cd /tmp/
#  pacman-mirrors -g -c France -o list1

#  pacman-mirrors -g -c Netherlands -o list2

#  pacman-mirrors -g -c United_Kingdom -o list3

#  pacman-mirrors -g -c germany -o list4


On vérifie le résultat de tous les fichiers list* et la sortie de la commande va nous servir à configurer le fichier /etc/pacman.d/mirrors/Custom :

#  egrep -h "Server" list*
Server = http://manjarolinux.polymorf.fr/stable/$repo/$arch
Server = http://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
Server = http://www.mirrorservice.org/sites/repo.manjaro.org/repos/stable/$repo/$arch
Server = http://mirror.catn.com/pub/manjaro/stable/$repo/$arch
Server = http://manjaro.mirrors.uk2.net/stable/$repo/$arch
Server = http://repo.manjaro.org.uk/stable/$repo/$arch
Server = http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/$repo/$arch
Server = http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch
Server = http://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch


Je crée le fichier Custom

#  nano -w /etc/pacman.d/mirrors/Custom

En tête de ce fichier je mets ces 4 lignes :

##
## Pacman Mirrorlist
##
[Custom]

puis à la suite je colle le résultat de la commande précédente (# egrep -h "Server" list*)

pour avoir au final :

##
## Pacman Mirrorlist
##
[Custom]
Server = http://manjarolinux.polymorf.fr/stable/$repo/$arch
Server = http://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
Server = http://www.mirrorservice.org/sites/repo.manjaro.org/repos/stable/$repo/$arch
Server = http://mirror.catn.com/pub/manjaro/stable/$repo/$arch
Server = http://manjaro.mirrors.uk2.net/stable/$repo/$arch
Server = http://repo.manjaro.org.uk/stable/$repo/$arch
Server = http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/$repo/$arch
Server = http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch
Server = http://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch

puis on continue par l'édition de /etc/pacman-mirrors.conf

#  nano -w /etc/pacman-mirrors.conf

et je décommente la ligne # OnlyCountry=Germany pour au final avoir :
OnlyCountry=Custom

On lance la commande :

#  pacman-mirrors -g
:: Querying servers, this may take some time...
:: Only country: Custom
 -> 0.496 http://manjarolinux.polymorf.fr/stable/$repo/$arch
 -> 0.347 http://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
 -> unreachable http://www.mirrorservice.org/sites/repo.manjaro.org/repos/stable/$repo/$arch
 -> unreachable http://mirror.catn.com/pub/manjaro/stable/$repo/$arch
 -> 0.353 http://manjaro.mirrors.uk2.net/stable/$repo/$arch
 -> 0.398 http://repo.manjaro.org.uk/stable/$repo/$arch
 -> unreachable http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable/$repo/$arch
 -> 0.679 http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch
 -> 0.699 http://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch
:: Generated and saved '/etc/pacman.d/mirrorlist' mirrorlist.

On vérifie le résultat :

#  egrep -h "Loca|Server" /etc/pacman.d/mirrorlist
## Location: Custom
Server = http://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch
## Location: Custom
Server = http://manjaro.mirrors.uk2.net/stable/$repo/$arch
## Location: Custom
Server = http://repo.manjaro.org.uk/stable/$repo/$arch
## Location: Custom
Server = http://manjarolinux.polymorf.fr/stable/$repo/$arch
## Location: Custom
Server = http://ftp.rz.tu-bs.de/pub/mirror/manjaro.org/repos/stable/$repo/$arch
## Location: Custom
Server = http://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch


Ne reste plus qu'à lancer un pacman -Syy

Une mirrorlist Custom

#8Messageil y a 10 ans

Je suppose que la modif est là :
puis à la suite je colle le résultat de la commande précédente (# egrep -h "Server" list*)

Oui, tu as raison.

D'ailleurs entre temps j'avais ajouté la sortie de cat /etc/pacman.d/mirrors/Custom
pour mettre en évidence la présence de [Custom] que je rappellerai dans la version finale car dans la précédente rédaction son existence n'apparaissait pas.

Une mirrorlist Custom

#9Messageil y a 10 ans

cep a écrit :Je suppose que la modif est là :
puis à la suite je colle le résultat de la commande précédente (# egrep -h "Server" list*)
Oui, tu as raison.
D'ailleurs entre temps j'avais ajouté la sortie de cat /etc/pacman.d/mirrors/Custom
pour mettre en évidence la présence de [Custom] que je rappellerai dans la version finale car dans la précédente rédaction son existence n'apparaissait pas.

Exactly sir.

Une mirrorlist Custom

#10Messageil y a 10 ans

:bjr:

Je viens de faire ça sur les deux ordinateurs :clap:clap

Une mirrorlist Custom

#11Messageil y a 10 ans

Une mirrorlist Custom

#12Messageil y a 10 ans

Une mirrorlist Custom

#13Messageil y a 10 ans

Et maintenant, tu passes ?

Une mirrorlist Custom

#14Messageil y a 10 ans

Yes ! Merci ;)

Une mirrorlist Custom

#15Messageil y a 10 ans

Esclapion a écrit :La solution pamir est quand même beaucoup plus simple ?

Oui.
Et non ;)
Non lorsque pacman-mirrors est appelé par une routine lors d'un upgrade. Il faudrait donc faire un lien pamir vers un pseudo pacman-mirrors. Mais alors cela demande à suivre pamir et éventuellement gérer les modifs de pacman en unstable. Problème de temps donc et de disponibilité, comme chaque fois que l'on propose un programme à grande échelle.

Une mirrorlist Custom

#16Messageil y a 10 ans

Esclapion a écrit :La solution pamir est quand même beaucoup plus simple ?

Celle décrite par cep n'est pas bien compliquée ; comme c'est ce que j'ai utilisé, je vais en rester là pour l'instant.

Et ce qui est bien c'est qu'on a le choix entre deux solutions ; bravo aux deux :clap

Une mirrorlist Custom

#17Messageil y a 10 ans

:bjr:

Dommage, on aurait pu progresser. Pourquoi faire des tas de manips quand une seule suffit. Comprends pas. Je me désabonne de ce sujet.

Une mirrorlist Custom

#18Messageil y a 10 ans

Esclapion a écrit ::bjr:
Dommage, on aurait pu progresser. Pourquoi faire des tas de manips quand une seule suffit. Comprends pas. Je me désabonne de ce sujet.

! ?? !

Ta solution est bien, mais celle de cep issue d'un sujet de philm aussi (https://classicforum.manjaro.org/index.php?topic=5287.0).

La liberté, c'est de pouvoir choisir.

Une mirrorlist Custom

#19Messageil y a 10 ans

Esclapion a écrit ::bjr:

Dommage, on aurait pu progresser. Pourquoi faire des tas de manips quand une seule suffit. Comprends pas. Je me désabonne de ce sujet.

Non, on s'est mal compris ou alors j'ai été trop bref dans mes explications.
Alors je détaille. Oui, je trouve la solution pamir plus simple, c'est incontestable.
Pour le reste, hier je disais que ton hack de pouvoir sur une même commande regrouper plusieurs pays devrait être ajouté à pacman-mirrors qui, je pense, est un soft très limité et pour le dire encore plus directement, est trop simpliste.
Alors, oui pamir est plus complet sur le choix des pays mais malheureusement il aura du mal en l'état actuel à cohabiter avec pacman-mirrors qui sera appelé lors des mises à jour.
DOnc moi, si tu permets, je te conseillerai plutôt de proposer ton hack aux devs de pacman-mirrors.
Ce tour du monde des mirroirs à chaque mise à jour est tout simplement ridicule. Et de ce point de vue le Custom de philm est une bonne chose. Couplé à ton pamir ce serait parfait.
Ah, oui, une dernière chose, ne m'oblige plus à faire des contorsions de diplomatie, c'est pour moi un rôle contre nature :)
Répondre