Page 1 sur 1

Une mirrorlist Custom

Publié : 27 jui 2013, 08:12
par cep
É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

Re: Une mirrorlist Custom

Publié : 27 jui 2013, 08:41
par ewolnux
Bonjour :bjr:

Excellent :clap

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

Re: Une mirrorlist Custom

Publié : 27 jui 2013, 08:50
par cep
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.

Re: Une mirrorlist Custom

Publié : 27 jui 2013, 09:02
par ewolnux
Tu peux faire la page directement ; ceux qui trouveraient d'éventuelles corrections à faire peuvent très bien le faire dans le wiki.

Pour le fonctionnement du wiki :

https://wiki.manjaro.org/index.php?title ... es_de_base

viewtopic.php?f=14&t=398

Re: Une mirrorlist Custom

Publié : 27 jui 2013, 09:29
par Loubrix
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...

Re: Une mirrorlist Custom

Publié : 27 jui 2013, 09:53
par cep
En effet, astucieux le coup de Custom.
Ok pour le wiki, j'ai ouvert un compte et ferai la page bientôt.

Re: Une mirrorlist Custom

Publié : 27 jui 2013, 10:09
par ewolnux
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

Re: Une mirrorlist Custom

Publié : 27 jui 2013, 10:29
par cep
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.

Re: Une mirrorlist Custom

Publié : 27 jui 2013, 10:50
par ewolnux
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.

Re: Une mirrorlist Custom

Publié : 28 jui 2013, 19:00
par ewolnux
:bjr:

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

Re: Une mirrorlist Custom

Publié : 28 jui 2013, 22:44
par Esclapion
La solution pamir est quand même beaucoup plus simple ?

Re: Une mirrorlist Custom

Publié : 28 jui 2013, 23:58
par kilimand22
:bjr:
Le lien solution pamir http://www.manjaro.fr/forum/viewtopic.php?f=2&t=1814
-amène là :
Information
Vous n’êtes pas autorisé(e) à consulter ce forum.

:sourire:

Re: Une mirrorlist Custom

Publié : 29 jui 2013, 00:14
par Esclapion
Et maintenant, tu passes ?

Re: Une mirrorlist Custom

Publié : 29 jui 2013, 00:30
par kilimand22
Yes ! Merci ;)

Re: Une mirrorlist Custom

Publié : 29 jui 2013, 06:02
par cep
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.

Re: Une mirrorlist Custom

Publié : 29 jui 2013, 08:17
par ewolnux
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

Re: Une mirrorlist Custom

Publié : 29 jui 2013, 11:27
par Esclapion
: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.

Re: Une mirrorlist Custom

Publié : 29 jui 2013, 11:53
par ewolnux
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.

Re: Une mirrorlist Custom

Publié : 29 jui 2013, 13:24
par cep
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 :)