Skip to content
Snippets Groups Projects
Commit 9acfa83f authored by Frede H's avatar Frede H :speech_balloon:
Browse files

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	pacman_mirrors/pacman_mirrors.py
parents c4bbec81 a1b89b77
No related branches found
No related tags found
No related merge requests found
Showing
with 86 additions and 77 deletions
......@@ -20,13 +20,18 @@ Pacman-mirrors requires access to files which are read-only
so it must be run with su or sudo.
To create a up-to-date mirrorlist using all default use,
pacman-mirrors --fasttrack 10 --sync
pacman-mirrors --fasttrack 10 && sudo pacman -Syy
The mirrorlist generation process can be refined through arguments
and arguments with options, for example,
pacman-mirrors --country Denmark --timeout 5
## IMPORTANT
After all operations **ALWAYS** syncronize your pacman database with
sudo pacman -Syy
# OPTIONS
Some options are mutual exclusive and will throw an arguments error:
......@@ -57,18 +62,15 @@ The arguments can appear in any order except for arguments which takes
additional options in which case the options must follow
immediately after the argument, for example
pacman-mirrors -ayidS unstable
pacman-mirrors -aidS unstable
## METHODS
-g, \--generate
: Generate a new default mirrorlist using defaults
-f, \--fasttrack *NUMBER*
: Generates an up-to-date mirrorlist for the users current branch,
mirrors are randomly selected from <http://repo.manjaro.org/status.json>,
the randomly selected mirrors are ranked by their current access time.
The higher number the higher possibility of a fast mirror.
-i, \--interactive [--default]
: Launches a tool for selectively picking mirrors and protocols,
**--default** forces pacman-mirrors to load the default mirror
......@@ -139,9 +141,6 @@ immediately after the argument, for example
-v, \--version
: Show the version of pacman-mirrors
-y, \--sync
: Instruct pacman-mirrors to syncronize the pacman database
## Exit status:
0 : OK
......@@ -199,27 +198,27 @@ of editing your pacman-mirrors configuration.
*sudo pacman-mirrors -l*
* I want to temporary change branch to unstable,
use geolocation and syncronize pacman,
use geolocation,
*sudo pacman-mirrors -yb unstable --geoip*
*sudo pacman-mirrors -b unstable --geoip*
* I want to permanently change branch to unstable,
use mirrors from Germany and France,
use only https and http protocol in that order and syncronize pacman
use only https and http protocol in that order
*sudo pacman-mirrors -yac Germany,France -S unstable -P https http*
*sudo pacman-mirrors -ac Germany,France -S unstable -P https http*
* Create a mirrorlist with German mirrors and syncronize pacman
* Create a mirrorlist with German mirrors
*sudo pacman-mirrors -yc Germany*
*sudo pacman-mirrors -c Germany*
* If you want more countries in your mirrorlist add them
*sudo pacman-mirrors -yc Germany France Denmark*
*sudo pacman-mirrors -c Germany France Denmark*
* Create a mirrorlist with 5 mirrors with current packages and syncronize pacman
* Create a mirrorlist with 5 mirrors up-to-date on your branch
*sudo pacman-mirrors -yf 5*
*sudo pacman-mirrors -f 5*
* I want to choose my mirrors
......@@ -275,4 +274,4 @@ Esclapion <esclapion@manjaro.org>
philm <philm@manjaro.org>
Ramon Buldó <rbuldo@gmail.com>
Hugo Posnic <huluti@manjaro.org>
Frede Hundewadt <frede@hundewadt.dk>
Frede Hundewadt <fh@manjaro.org>
......@@ -2,9 +2,9 @@
# Copyright (C) 2017 ORGANIZATION
# This file is distributed under the same license as the pacman-mirrors
# project.
#
#
# Translators:
# Frede H. <frede@hundewadt.dk>, 2017
# Frede H. <fh@manjaro.org>, 2017
# scootergrisen, 2017
msgid ""
msgstr ""
......@@ -12,7 +12,7 @@ msgstr ""
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2017-02-20 15:44+0100\n"
"PO-Revision-Date: 2017-03-27 14:54+0000\n"
"Last-Translator: Frede H. <frede@hundewadt.dk>\n"
"Last-Translator: Frede H. <fh@manjaro.org>\n"
"Language-Team: Danish (http://www.transifex.com/manjarolinux/manjaro-pacman-mirrors/language/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
......
......@@ -208,6 +208,6 @@ BRANCH: Value from config</code></pre>
<h1 id="see-also">SEE ALSO</h1>
<p>The pacman-mirrors source code and all documentation may be downloaded from <a href="https://github.com/manjaro/pacman-mirrors/archive/master.zip" class="uri">https://github.com/manjaro/pacman-mirrors/archive/master.zip</a></p>
<h1 id="authors">AUTHORS</h1>
<p>Esclapion <a href="mailto:esclapion@manjaro.org">esclapion@manjaro.org</a> philm <a href="mailto:philm@manjaro.org">philm@manjaro.org</a> Ramon Buldó <a href="mailto:rbuldo@gmail.com">rbuldo@gmail.com</a> Hugo Posnic <a href="mailto:huluti@manjaro.org">huluti@manjaro.org</a> Frede Hundewadt <a href="mailto:frede@hundewadt.dk">frede@hundewadt.dk</a></p>
<p>Esclapion <a href="mailto:esclapion@manjaro.org">esclapion@manjaro.org</a> philm <a href="mailto:philm@manjaro.org">philm@manjaro.org</a> Ramon Buldó <a href="mailto:rbuldo@gmail.com">rbuldo@gmail.com</a> Hugo Posnic <a href="mailto:huluti@manjaro.org">huluti@manjaro.org</a> Frede Hundewadt <a href="mailto:fh@manjaro.org">fh@manjaro.org</a></p>
</body>
</html>
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors Configuration Functions"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors Configuration"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors TUI Module"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors Text Module"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors Console Functions"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors Custom Functions"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Manjaro-Mirrors File Functions"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Manjaro-Mirrors HTTP Functions"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors JSON Functions"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors Niscellaneous Functions"""
import shutil
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors Validation Functions"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors Mirror"""
......
......@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with pacman-mirrors. If not, see <http://www.gnu.org/licenses/>.
#
# Authors: Frede Hundewadt <frede@hundewadt.dk>
# Authors: Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirror Mirror Functions"""
......
......@@ -19,7 +19,7 @@
# philm <philm@manjaro.org>
# Ramon Buldó <rbuldo@gmail.com>
# Hugo Posnic <huluti@manjaro.org>
# Frede Hundewadt <frede@hundewadt.dk>
# Frede Hundewadt <fh@manjaro.org>
"""Pacman-Mirrors Main Module"""
......@@ -65,7 +65,6 @@ class PacmanMirrors:
self.config = {
"config_file": conf.CONFIG_FILE # purpose - testability
}
self.country_list = False
self.custom = False
self.default = False
self.fasttrack = None
......@@ -177,18 +176,16 @@ class PacmanMirrors:
sys.exit(0)
if args.country_list:
self.country_list = True
self.output_country_list()
sys.exit(0)
if os.getuid() != 0:
print(".: {} {}".format(txt.ERR_CLR, txt.MUST_BE_ROOT))
sys.exit(1)
if args.generate:
print(".: {} {} {} {}".format(color.YELLOW,
"Argument '-g/--generate' is deprecated.",
color.ENDCOLOR,
"Use '-f/--fasttrack'."
))
print(".:{} Argument '-g/--generate' is deprecated.{}\n"
".: Please use '-f/--fasttrack' use 0 for all mirrors".format(color.YELLOW, color.ENDCOLOR))
if args.method:
self.config["method"] = args.method
......@@ -330,7 +327,7 @@ class PacmanMirrors:
apifn.write_protocols(self.config["protocols"],
self.config["config_file"],
quiet=self.quiet)
# Fifth API taks: Rebranch the mirrorlist
# Fifth API task: Rebranch the mirrorlist
if re_branch:
if not set_branch:
print(".: {} {}".format(txt.ERR_CLR, txt.API_ERROR_BRANCH))
......@@ -411,21 +408,24 @@ class PacmanMirrors:
* Modify the configuration file to use the "custom" file.
* Outputs a pacman mirrorlist,
"""
# TODO: build_interactive_mirror_list needs refactoring
worklist = mirrorfn.filter_mirror_country(self.mirrors.mirrorlist,
self.selected_countries)
# leave only the user selected protocols
if self.config["protocols"]:
worklist = mirrorfn.filter_mirror_protocols(
worklist, self.config["protocols"])
# rank or shuffle the mirrorlist before showing the ui
if not self.default:
# filter not up-to-date mirrors for selected branch
# worklist = self.filter_user_branch(worklist)
if self.config["method"] == "rank":
worklist = self.test_mirrors(worklist)
worklist = sorted(worklist, key=itemgetter("resp_time"))
else:
shuffle(worklist)
interactive_list = []
# create a list for display in ui
for mirror in worklist:
# create an entry for all protocols related to a mirror
for protocol in enumerate(mirror["protocols"]):
pos = mirror["url"].find(":")
interactive_list.append({
......@@ -434,6 +434,7 @@ class PacmanMirrors:
"last_sync": mirror["last_sync"],
"url": "{}{}".format(protocol[1], mirror["url"][pos:])
})
# import the right ui
if self.no_display:
from . import consoleui as ui
else:
......@@ -441,24 +442,37 @@ class PacmanMirrors:
interactive = ui.run(interactive_list,
self.config["method"] == "random",
self.default)
# process user choices
if interactive.is_done:
mirror_list = [] # written to mirrorlist
mirror_file = [] # written to custom-mirror.json
custom_list = interactive.custom_list
for item in custom_list:
ipos = item["url"].find(":")
iurl = item["url"][ipos:]
for server in self.mirrors.mirrorlist:
spos = server["url"].find(":")
surl = server["url"][spos:]
if iurl == surl:
# TODO: refactor needed
# loop custom list
for custom in custom_list:
# get url without protocol
c_pos = custom["url"].find(":")
c_url = custom["url"][c_pos:]
# locate mirror in the full mirrorlist
for mirror in self.mirrors.mirrorlist:
m_pos = mirror["url"].find(":")
m_url = mirror["url"][m_pos:]
# compare urls
if c_url == m_url:
# mirror file
mirror_file.append({
"country": server["country"],
"protocols": server["protocols"],
"url": server["url"]
"country": mirror["country"],
"protocols": mirror["protocols"],
"url": mirror["url"]
})
server["protocols"] = self.config["protocols"]
mirror_list.append(server)
# mirror list
try:
_ = self.config["protocols"][0]
mirror["protocols"] = self.config["protocols"]
except IndexError:
pass
mirror_list.append(mirror)
# since no ranking/shuffling is done pre loading the ui do post unload
if self.default and mirror_list:
if self.config["method"] == "rank":
mirror_list = self.test_mirrors(mirror_list)
......@@ -466,6 +480,7 @@ class PacmanMirrors:
key=itemgetter("resp_time"))
else:
shuffle(mirror_list)
# mirror file list is not empty
if mirror_file:
print("\n.: {} {}".format(txt.INF_CLR,
txt.CUSTOM_MIRROR_LIST))
......@@ -498,22 +513,20 @@ class PacmanMirrors:
def filter_user_branch(self, mirrorlist):
"""Filter mirrorlist on users branch and branch sync state"""
if self.config["branch"] == "stable":
selected_branch = 0
elif self.config["branch"] == "testing":
selected_branch = 1
else:
selected_branch = 2
filtered = []
for mirror in mirrorlist:
if mirror["branches"][selected_branch] == 1:
filtered.append(mirror)
if len(filtered) > 0:
return filtered
for idx, branch in enumerate(conf.BRANCHES):
if branch == self.config["branch"]:
filtered = []
for mirror in mirrorlist:
if mirror["branches"][idx] == 1:
filtered.append(mirror)
if len(filtered) > 0:
return filtered
return mirrorlist
def output_country_list(self):
"""List all available countries"""
self.config["only_country"] = ["all"]
self.load_all_mirrors()
print("{}".format("\n".join(self.mirrors.countrylist)))
def load_all_mirrors(self):
......@@ -629,9 +642,6 @@ class PacmanMirrors:
self.config["method"] = "random" # use random instead of rank
self.fasttrack = False # using fasttrack is not possible
self.load_all_mirrors()
if self.country_list:
self.output_country_list() # print country list
sys.exit(0)
if self.fasttrack:
self.build_fasttrack_mirror_list(self.fasttrack) # fasttrack argument
elif self.interactive:
......
......@@ -2,7 +2,7 @@
"docs": [
{
"location": "/",
"text": "% pacman-mirrors(8) Pacman-Mirrors 4.3 User Manual\n%\n% September, 2017\n\n\nNAME\n\n\npacman-mirrors - generate pacman mirrorlist for Manjaro Linux\n\n\nSYNOPSIS\n\n\npacman-mirrors [-f \nNUMBER\n | [[-i [-d]] [-c \nCOUNTRY\n, [\nCOUNTRY\n] ... | --geoip]]] [-m \nMETHOD\n] [-a [-p \nPREFIX\n] [-R] [-G | -S \nBRANCH\n] [-P \nPROTO\n [\nPROTO\n] ...][-U \nURL\n]] [-b \nBRANCH\n] [-t \nSECONDS\n] [-q] [-v] [-n | -y]\n\n\nDESCRIPTION\n\n\nGenerate mirrorlist for Manjaro Linux.\nDefault is to rank all mirrors by reponse time.\nIf no arguments are given pacman-mirrors lists available options.\nPacman-mirrors requires access to files which are read-only\nso it must be run with su or sudo.\nTo create a up-to-date mirrorlist using all default use,\n\n\npacman-mirrors --fasttrack 10 --sync\n\n\n\nThe mirrorlist generation process can be refined through arguments\nand arguments with options, for example,\n\n\npacman-mirrors --country Denmark --timeout 5\n\n\n\nOPTIONS\n\n\nSome options are mutual exclusive and will throw an arguments error:\n\n\n\n\n--no-mirrorlist\n and \n--sync\n\n\n--branch\n, \n--get-branch\n and \n--set-branch\n\n\n--sync\n and \n--no-mirrorlist\n\n\n--country\n and \n--geoip\n\n\n\n\nOthers can be used together but they have precedence.\nIf the fasttrack arg is used with interactive, country or geoip\nthe fasttrack arg will have precendence and the others are ignored.\nSome arguments requires other argument to have effect for example,\nthis command will ignore --default argument\n\n\nWRONG pacman-mirrors -b unstable --default\n\n\n\nas it should have been in conjunction with --interactive, like\n\n\nCORRECT pacman-mirrors -b unstable --interactive --default\n\n\n\nThe same goes for the API specific arguments.\nFor those to have effect the --api argument must be present also.\n\n\npacman-mirrors -aS unstable\n\n\n\nThe arguments can appear in any order except for arguments which takes\nadditional options in which case the options must follow\nimmediately after the argument, for example\n\n\npacman-mirrors -ayidS unstable\n\n\n\nMETHODS\n\n\n-g, --generate\n: Generate a new default mirrorlist using defaults\n\n\n-f, --fasttrack \nNUMBER\n\n: Generates an up-to-date mirrorlist for the users current branch,\n mirrors are randomly selected from \nhttp://repo.manjaro.org/status.json\n,\n the randomly selected mirrors are ranked by their current access time.\n The higher number the higher possibility of a fast mirror.\n\n\n-i, --interactive [--default]\n: Launches a tool for selectively picking mirrors and protocols,\n \n--default\n forces pacman-mirrors to load the default mirror\n file and ignore any preset custom-mirrors file, thus allowing for\n reselecting mirrors for a new custom mirror file\n\n\n-m, --method \nMETHOD\n\n: Default method is \nrank\n but \nrandom\n can be selected\n\n\nBRANCH\n\n\n-b, --branch \nBRANCH\n\n: Temporarily use another branch, \nstable\n, \ntesting\n or \nunstable\n,\n the branch is reset with next run of pacman-mirrors\n\n\nCOUNTRY\n\n\n-c, --country \nCOUNTRY\n [\nCOUNTRY\n] ...\n: Specifiy a country or a list of countries\n\n\n--geoip\n: Use geolocation if possible, if not uses all mirrors\n\n\n-l, --list, --country-list\n: Lists available mirror countries\n\n\nAPI\n\n\n-a, --api [-p \nPREFIX\n] [-R] [-G|-S \nBRANCH\n] [-P \nPROTO\n [\nPROTO\n] ...] [-U \nURL\n]\n: Instructs pacman-mirrors to activate processing of API arguments\n\n\n-p, --prefix \nPREFIX\n\n: Add a path prefix to pacman-mirrors file-handling\n eg. \n/mnt/install\n or \n$mnt\n\n\n-G, --get-branch\n: Return branch from configuration.\n\n\n-P, --proto, --protocols \nPROTO\n [\nPROTO\n] ...\n: Write protocols to configuration,\n use \nall\n or \nhttp\n, \nhttps\n, \nftp\n and \nftps\n\n\n-R, --re-branch\n: Replace branch in mirrorlist\n\n\n-S, --set-branch \nBRANCH\n\n: Replace branch in configuration,\n use \nstable\n, \ntesting\n or \nunstable\n\n\n-U, --url \nURL\n\n: Replace mirrorlist with supplied url\n\n\nMISC\n\n\n-h, --help\n: Show the help message\n\n\n-n, --no-mirrorlist\n: Use to skip generation of mirrorlist\n\n\n-q, --quiet\n: Make pacman-mirrors silent\n\n\n-t, --timeout \nSECONDS\n\n: Change the number of seconds waiting for a server response,\n SSL enabled mirrors has this value doubled to compensate\n for the time spent on exchanging encryption keys\n\n\n-v, --version\n: Show the version of pacman-mirrors\n\n\n-y, --sync\n: Instruct pacman-mirrors to syncronize the pacman database\n\n\nExit status:\n\n\n0 : OK\n1 : Problem with argument\n2 : Problem accessing systemfiles\n3 : Missing mirror file\nBRANCH: Value from config\n\n\n\nConfiguration flow of pacman-mirrors\n\n\nAt launch an internal default configuration is setup,\nfile configuration is applied and the commandline is parsed and applied.\n\n\nAPI arguments\n\n\nThese arguments modifies key elements of pacman-mirrors configuration\naccording to the packagers needs.\n\n\nThe actions performed by the API are in strict order and\nperformed \nbefore any\n other actions. This also means that ordinary arguments\nsupplied in conjunction with app might be ignored. Eg. \n-U\n argument terminates\npacman-mirrors when branch and mirrorlist has been written.\n\n\n\n\nIf \n-G\n\n\nprint \nconfig.branch\n\n\nsys.exit(0)\n\n\nIf \np\n \nPREFIX\n\n\nadd \nPREFIX\n to internal file configuration\n\n\nIf \n-S\n \nBRANCH\n\n\napply \nBRANCH\n to internal configuration\n\n\nreplace branch in pacman-mirrors.conf with \nBRANCH\n\n\nIf \n-U\n \nURL\n\n\napply internal configuration to a mirrorlist with \nURL\n\n\nsys.exit(0)\n\n\nIf \n-P\n \nPROTO\n [\nPROTO\n] ...\n\n\nreplace protocols in pacman-mirrors.conf with \nPROTO\n\n\nIf \n-R\n\n\nreplace branch in mirrorlist with \n-S\n \nBRANCH\n\n\n\n\nWhen done pacman-mirrors checks the internet connection and if possible\ndownload the latest datafiles for creating the mirrorlist.\nAt this point it is possible to interrupt further processing.\n\n\nIf the \n-n\n argument is present pacman-mirrors will now exit.\n\n\nEXAMPLES\n\n\nMost optional arguments are self explaining others require explanation.\nThe API functions is mainly designed to help packagers and iso-builders.\nHowever it can be of use for everyone because it takes the hazzle out\nof editing your pacman-mirrors configuration.\n\n\n\n\n\n\nWhich countries has mirrors?\n\n\nsudo pacman-mirrors -l\n\n\n\n\n\n\nI want to temporary change branch to unstable,\nuse geolocation and syncronize pacman,\n\n\nsudo pacman-mirrors -yb unstable --geoip\n\n\n\n\n\n\nI want to permanently change branch to unstable,\nuse mirrors from Germany and France,\nuse only https and http protocol in that order and syncronize pacman\n\n\nsudo pacman-mirrors -yac Germany,France -S unstable -P https http\n\n\n\n\n\n\nCreate a mirrorlist with German mirrors and syncronize pacman\n\n\nsudo pacman-mirrors -yc Germany\n\n\n\n\n\n\nIf you want more countries in your mirrorlist add them\n\n\nsudo pacman-mirrors -yc Germany France Denmark\n\n\n\n\n\n\nCreate a mirrorlist with 5 mirrors with current packages and syncronize pacman\n\n\nsudo pacman-mirrors -yf 5\n\n\n\n\n\n\nI want to choose my mirrors\n\n\nsudo pacman-mirrors -i\n\n\n\n\n\n\nI have a custom mirror list and I want to create a new custom mirror list?\n\n\nsudo pacman-mirrors -i --default\n\n\n\n\n\n\nI have a custom mirror list - can I reset it?\n\n\nsudo pacman-mirrors -c all\n\n\n\n\n\n\nWhat branch am I on\n\n\nsudo pacman-mirrors -aG\n\n\n\n\n\n\nChange system branch and dont change the mirrorlist\n\n\nsudo pacman-mirrors -naS unstable\n\n\n\n\n\n\nChange system branch and replace branch in mirrorlist and quit\n\n\nsudo pacman-mirrors -naRS unstable\n\n\n\n\n\n\nChange protocols you will accept but dont touch the mirrorlist\n\n\nsudo pacman-mirrors -naP https http\n\n\n\n\n\n\nA packager can write directly to a mounted systems\ndatafiles using either a path or an environment variable\nreplacing the branch in both configuration and mirrorlist\nleaving the mirrors as is\n\n\nsudo pacman-mirrors -anR -p $prefix -S $branch -P https\n\n\n\n\n\n\nIt is also possible to specify a mirror in which case the mirrorlist\nis created and pacman-mirrors terminate\n\n\nsudo pacman-mirrors -ap $prefix -S $branch -U $url\n\n\n\n\n\n\nREPORTING BUGS\n\n\nhttps://github.com/manjaro/pacman-mirrors/issues\n\n\nSEE ALSO\n\n\nThe pacman-mirrors source code and all documentation\nmay be downloaded from \nhttps://github.com/manjaro/pacman-mirrors/archive/master.zip\n\n\nAUTHORS\n\n\nEsclapion \nesclapion@manjaro.org\n\nphilm \nphilm@manjaro.org\n\nRamon Buld\u00f3 \nrbuldo@gmail.com\n\nHugo Posnic \nhuluti@manjaro.org\n\nFrede Hundewadt \nfrede@hundewadt.dk",
"text": "% pacman-mirrors(8) Pacman-Mirrors 4.3 User Manual\n%\n% September, 2017\n\n\nNAME\n\n\npacman-mirrors - generate pacman mirrorlist for Manjaro Linux\n\n\nSYNOPSIS\n\n\npacman-mirrors [-f \nNUMBER\n | [[-i [-d]] [-c \nCOUNTRY\n, [\nCOUNTRY\n] ... | --geoip]]] [-m \nMETHOD\n] [-a [-p \nPREFIX\n] [-R] [-G | -S \nBRANCH\n] [-P \nPROTO\n [\nPROTO\n] ...][-U \nURL\n]] [-b \nBRANCH\n] [-t \nSECONDS\n] [-q] [-v] [-n | -y]\n\n\nDESCRIPTION\n\n\nGenerate mirrorlist for Manjaro Linux.\nDefault is to rank all mirrors by reponse time.\nIf no arguments are given pacman-mirrors lists available options.\nPacman-mirrors requires access to files which are read-only\nso it must be run with su or sudo.\nTo create a up-to-date mirrorlist using all default use,\n\n\npacman-mirrors --fasttrack 10 --sync\n\n\n\nThe mirrorlist generation process can be refined through arguments\nand arguments with options, for example,\n\n\npacman-mirrors --country Denmark --timeout 5\n\n\n\nOPTIONS\n\n\nSome options are mutual exclusive and will throw an arguments error:\n\n\n\n\n--no-mirrorlist\n and \n--sync\n\n\n--branch\n, \n--get-branch\n and \n--set-branch\n\n\n--sync\n and \n--no-mirrorlist\n\n\n--country\n and \n--geoip\n\n\n\n\nOthers can be used together but they have precedence.\nIf the fasttrack arg is used with interactive, country or geoip\nthe fasttrack arg will have precendence and the others are ignored.\nSome arguments requires other argument to have effect for example,\nthis command will ignore --default argument\n\n\nWRONG pacman-mirrors -b unstable --default\n\n\n\nas it should have been in conjunction with --interactive, like\n\n\nCORRECT pacman-mirrors -b unstable --interactive --default\n\n\n\nThe same goes for the API specific arguments.\nFor those to have effect the --api argument must be present also.\n\n\npacman-mirrors -aS unstable\n\n\n\nThe arguments can appear in any order except for arguments which takes\nadditional options in which case the options must follow\nimmediately after the argument, for example\n\n\npacman-mirrors -ayidS unstable\n\n\n\nMETHODS\n\n\n-g, --generate\n: Generate a new default mirrorlist using defaults\n\n\n-f, --fasttrack \nNUMBER\n\n: Generates an up-to-date mirrorlist for the users current branch,\n mirrors are randomly selected from \nhttp://repo.manjaro.org/status.json\n,\n the randomly selected mirrors are ranked by their current access time.\n The higher number the higher possibility of a fast mirror.\n\n\n-i, --interactive [--default]\n: Launches a tool for selectively picking mirrors and protocols,\n \n--default\n forces pacman-mirrors to load the default mirror\n file and ignore any preset custom-mirrors file, thus allowing for\n reselecting mirrors for a new custom mirror file\n\n\n-m, --method \nMETHOD\n\n: Default method is \nrank\n but \nrandom\n can be selected\n\n\nBRANCH\n\n\n-b, --branch \nBRANCH\n\n: Temporarily use another branch, \nstable\n, \ntesting\n or \nunstable\n,\n the branch is reset with next run of pacman-mirrors\n\n\nCOUNTRY\n\n\n-c, --country \nCOUNTRY\n [\nCOUNTRY\n] ...\n: Specifiy a country or a list of countries\n\n\n--geoip\n: Use geolocation if possible, if not uses all mirrors\n\n\n-l, --list, --country-list\n: Lists available mirror countries\n\n\nAPI\n\n\n-a, --api [-p \nPREFIX\n] [-R] [-G|-S \nBRANCH\n] [-P \nPROTO\n [\nPROTO\n] ...] [-U \nURL\n]\n: Instructs pacman-mirrors to activate processing of API arguments\n\n\n-p, --prefix \nPREFIX\n\n: Add a path prefix to pacman-mirrors file-handling\n eg. \n/mnt/install\n or \n$mnt\n\n\n-G, --get-branch\n: Return branch from configuration.\n\n\n-P, --proto, --protocols \nPROTO\n [\nPROTO\n] ...\n: Write protocols to configuration,\n use \nall\n or \nhttp\n, \nhttps\n, \nftp\n and \nftps\n\n\n-R, --re-branch\n: Replace branch in mirrorlist\n\n\n-S, --set-branch \nBRANCH\n\n: Replace branch in configuration,\n use \nstable\n, \ntesting\n or \nunstable\n\n\n-U, --url \nURL\n\n: Replace mirrorlist with supplied url\n\n\nMISC\n\n\n-h, --help\n: Show the help message\n\n\n-n, --no-mirrorlist\n: Use to skip generation of mirrorlist\n\n\n-q, --quiet\n: Make pacman-mirrors silent\n\n\n-t, --timeout \nSECONDS\n\n: Change the number of seconds waiting for a server response,\n SSL enabled mirrors has this value doubled to compensate\n for the time spent on exchanging encryption keys\n\n\n-v, --version\n: Show the version of pacman-mirrors\n\n\n-y, --sync\n: Instruct pacman-mirrors to syncronize the pacman database\n\n\nExit status:\n\n\n0 : OK\n1 : Problem with argument\n2 : Problem accessing systemfiles\n3 : Missing mirror file\nBRANCH: Value from config\n\n\n\nConfiguration flow of pacman-mirrors\n\n\nAt launch an internal default configuration is setup,\nfile configuration is applied and the commandline is parsed and applied.\n\n\nAPI arguments\n\n\nThese arguments modifies key elements of pacman-mirrors configuration\naccording to the packagers needs.\n\n\nThe actions performed by the API are in strict order and\nperformed \nbefore any\n other actions. This also means that ordinary arguments\nsupplied in conjunction with app might be ignored. Eg. \n-U\n argument terminates\npacman-mirrors when branch and mirrorlist has been written.\n\n\n\n\nIf \n-G\n\n\nprint \nconfig.branch\n\n\nsys.exit(0)\n\n\nIf \np\n \nPREFIX\n\n\nadd \nPREFIX\n to internal file configuration\n\n\nIf \n-S\n \nBRANCH\n\n\napply \nBRANCH\n to internal configuration\n\n\nreplace branch in pacman-mirrors.conf with \nBRANCH\n\n\nIf \n-U\n \nURL\n\n\napply internal configuration to a mirrorlist with \nURL\n\n\nsys.exit(0)\n\n\nIf \n-P\n \nPROTO\n [\nPROTO\n] ...\n\n\nreplace protocols in pacman-mirrors.conf with \nPROTO\n\n\nIf \n-R\n\n\nreplace branch in mirrorlist with \n-S\n \nBRANCH\n\n\n\n\nWhen done pacman-mirrors checks the internet connection and if possible\ndownload the latest datafiles for creating the mirrorlist.\nAt this point it is possible to interrupt further processing.\n\n\nIf the \n-n\n argument is present pacman-mirrors will now exit.\n\n\nEXAMPLES\n\n\nMost optional arguments are self explaining others require explanation.\nThe API functions is mainly designed to help packagers and iso-builders.\nHowever it can be of use for everyone because it takes the hazzle out\nof editing your pacman-mirrors configuration.\n\n\n\n\n\n\nWhich countries has mirrors?\n\n\nsudo pacman-mirrors -l\n\n\n\n\n\n\nI want to temporary change branch to unstable,\nuse geolocation and syncronize pacman,\n\n\nsudo pacman-mirrors -yb unstable --geoip\n\n\n\n\n\n\nI want to permanently change branch to unstable,\nuse mirrors from Germany and France,\nuse only https and http protocol in that order and syncronize pacman\n\n\nsudo pacman-mirrors -yac Germany,France -S unstable -P https http\n\n\n\n\n\n\nCreate a mirrorlist with German mirrors and syncronize pacman\n\n\nsudo pacman-mirrors -yc Germany\n\n\n\n\n\n\nIf you want more countries in your mirrorlist add them\n\n\nsudo pacman-mirrors -yc Germany France Denmark\n\n\n\n\n\n\nCreate a mirrorlist with 5 mirrors with current packages and syncronize pacman\n\n\nsudo pacman-mirrors -yf 5\n\n\n\n\n\n\nI want to choose my mirrors\n\n\nsudo pacman-mirrors -i\n\n\n\n\n\n\nI have a custom mirror list and I want to create a new custom mirror list?\n\n\nsudo pacman-mirrors -i --default\n\n\n\n\n\n\nI have a custom mirror list - can I reset it?\n\n\nsudo pacman-mirrors -c all\n\n\n\n\n\n\nWhat branch am I on\n\n\nsudo pacman-mirrors -aG\n\n\n\n\n\n\nChange system branch and dont change the mirrorlist\n\n\nsudo pacman-mirrors -naS unstable\n\n\n\n\n\n\nChange system branch and replace branch in mirrorlist and quit\n\n\nsudo pacman-mirrors -naRS unstable\n\n\n\n\n\n\nChange protocols you will accept but dont touch the mirrorlist\n\n\nsudo pacman-mirrors -naP https http\n\n\n\n\n\n\nA packager can write directly to a mounted systems\ndatafiles using either a path or an environment variable\nreplacing the branch in both configuration and mirrorlist\nleaving the mirrors as is\n\n\nsudo pacman-mirrors -anR -p $prefix -S $branch -P https\n\n\n\n\n\n\nIt is also possible to specify a mirror in which case the mirrorlist\nis created and pacman-mirrors terminate\n\n\nsudo pacman-mirrors -ap $prefix -S $branch -U $url\n\n\n\n\n\n\nREPORTING BUGS\n\n\nhttps://github.com/manjaro/pacman-mirrors/issues\n\n\nSEE ALSO\n\n\nThe pacman-mirrors source code and all documentation\nmay be downloaded from \nhttps://github.com/manjaro/pacman-mirrors/archive/master.zip\n\n\nAUTHORS\n\n\nEsclapion \nesclapion@manjaro.org\n\nphilm \nphilm@manjaro.org\n\nRamon Buld\u00f3 \nrbuldo@gmail.com\n\nHugo Posnic \nhuluti@manjaro.org\n\nFrede Hundewadt \nfh@manjaro.org",
"title": "Home"
},
{
......@@ -82,7 +82,7 @@
},
{
"location": "/#authors",
"text": "Esclapion esclapion@manjaro.org \nphilm philm@manjaro.org \nRamon Buld\u00f3 rbuldo@gmail.com \nHugo Posnic huluti@manjaro.org \nFrede Hundewadt frede@hundewadt.dk",
"text": "Esclapion esclapion@manjaro.org \nphilm philm@manjaro.org \nRamon Buld\u00f3 rbuldo@gmail.com \nHugo Posnic huluti@manjaro.org \nFrede Hundewadt fh@manjaro.org",
"title": "AUTHORS"
},
{
......@@ -106,4 +106,4 @@
"title": "Usage"
}
]
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment