• New package: remirror (obsoletes reflector-antergos)

    Hi all!

    Made a new thread for a new package, remirror.

    Some info about remirror can already be found at https://forum.antergos.com/topic/9127/reflector-antergos/84.


    The purpose of remirror is to obsolete and replace package reflector-antergos.

    This is because remirror can rank both Antergos and Arch mirrors. So remirror actually does the job of two separate tools, reflector-antergos and reflector.

    How to use remirror?

    Here are some examples.

    # get some usage help:
    remirror -h
    # rank Antergos and Arch mirrors only from selected countries:
    remirror --save=yes --c=France,Germany,Netherlands
    # show the list of all known countries:
    remirror --list
    # rank all known Antergos and Arch mirrors (good but slow):
    remirror --save=yes --p=https,http
    # just see the ranking results but don't save them (slow but quite interesting):

    So the usage of the tool is quite simple on the terminal. There are some ways to speed up the ranking process:

    • select only a small set of countries (no need to have all known mirrors ranked, and nearby countries are usually the fastest)
    • rank only https mirrors (default), not http mirrors
    • make the ranking timeout period for each mirror shorter (see option --tm for more)

    The greatest speed gain comes by selecting the mirrors properly. Also ranking only https mirrors saves much time.

    How to install it now?

    You may currently install remirror with the following terminal commands:

    cd /tmp  # or any folder you have write permissions
    wget https://github.com/manuel-192/remirror/raw/master/PKGBUILD
    makepkg -sic
    rm -f PKGBUILD remirror-*   # cleanup

    It installs (currently) two files to your system: /usr/bin/remirror and /usr/share/bash-completion/completions/remirror.

    And how to remove it?

    If you want to remove remirror from your system, just use the normal way how you remove packages, for example pamac-manager GUI or pacman.

    EDIT 2018-Oct-08: streamlined this post to match the current status of remirror.

  • @manuel said in New package: remirror (obsoletes reflector-antergos):

    rank mirror only from selected countries (much faster):

    remirror --save=yes --c=<countries-selected-by-you> --os=Antergos
    remirror --save=yes --c=<countries-selected-by-you> --os=Arch

    how do i add countries here?

    Example for Germany:

     remirror --save=yes --c=Germany --os=Antergos
  • can i rank both at once? Antergos+Arch?

  • i got error inside help file:

    /bin/remirror: line 514: [: -eq: unary operator expected

    remirror --h
    Antergos and Arch mirror ranking.
    Generates ranked official mirror lists to standard output.
    The generated lists are suitable for:
        /etc/pacman.d/antergos-mirrorlist    (option: -os=Antergos)
        /etc/pacman.d/mirrorlist             (option: -os=Arch)
    Note that only up-to-date mirrors are ranked and added to the list.
    Other mirrors can be added with option '-of'.
    Usage: /bin/remirror [options]
      --os=X   Operating system name. Supported: Antergos and Arch.
               X is Antergos by default.
      --c=X    Countries to include. This option could be used e.g. for ranking only
               nearby countries for efficiency.
               X is a comma separated list of country names.
               Note: use full country names (including spaces), such as
               "Czech Republic" or "Hong Kong".
               Remember to use quotes if spaces are included in the country name.
               By default, all supported countries are ranked.
      --p=X    Protocols to include. X is a comma separated list of protocol names
               (supported: https and http). Note that the order is significant.
               X is "https,http" by default.
      --tm=X   Max time (in seconds) to rank one mirror before timeout.
               X is 5 by default.
      --tr=X   Max time (in seconds) for fetching the master reference file
               before timeout. X is 10 by default.
      --save=X Saves the ranked mirror list to /etc/pacman.d after backing up the old list.
               Note: root permissions are required for saving.
               X=no: don't save (default), X=yes: save but no backup, X=backup: save and backup old.
      --of     Add official mirror list to the end (for reference).
      --quiet  Quiet mode, less screen output.
    /bin/remirror: line 514: [: -eq: unary operator expected
      --help   This help.
  • @joekamprad

    how do i add countries here?

    For example:

    remirror --save=yes --c=Germany,France,Netherlands

    can i rank both at once? Antergos+Arch?

    Yes, like in the example above.

    And thanks for the error report, I’ll fix it today.

    Cheers! :)

    EDIT 2018-Oct-08: matching the current status of remirror.

  • @joekamprad
    And now it is fixed! Thanks!

  • @joekamprad & al.

    can i rank both at once? Antergos+Arch?

    Yes! Now remirror supports ranking both Antergos and Arch mirrors in one pass.
    Here’s an example:

    remirror --save=yes --c-antergos=Germany --c-arch=Germany --os=both

    or even shorter because of the default values:

    remirror --save=yes --c-antergos=Germany --c-arch=Germany

    I’ll shorten this even further in the next release! :)

    Please look at the change list at: https://github.com/manuel-192/remirror

  • Still shorter compared to my previous post is:

    remirror --save=yes --c=Germany

    This line now uses the same list of countries for both Antergos and Arch mirror ranking (and ranks both Antergos and Arch mirror lists).

    The latest remirror release (0.1.15) on github now supports this kind of usage.

    Note however that the list of Arch mirror countries is much larger than the list for Antergos. Some countries even have a different name (USA on the Antergos list and ‘United States’ on the Arch list). So there may be problems using the old option --c=<countrylist>.

  • @manuel as we have mostly only two mirrors for each country at the ANtergos Mirrorlist, it is may also better to rank them by speed and quality only and not by country? i am not sure here but it looks problematic to me to only have two mirrors aviable, may they are failing both and updating fails, bette then to have some more may also be a bit more far away…

  • @joekamprad
    If I understand your concern correctly, you want more countries to be ranked. That can be done in two ways:

    # This ranks all known mirrors in all countries (both Antergos and Arch).
    # This took 11 minutes at my location.
    remirror --save=yes


    # This ranks only the mirror of a specific list of countries (both Antergos and Arch).
    # This took 1 minute at my location.
    remirror --save=yes --c=Denmark,France,Germany,Netherlands

    The idea of using options --c=<countrylist>, --c-arch=<countrylist>, and --c-antergos=<countrylist> is only to optimize the time used for the ranking process, by ruling out all other countries from ranking.
    These options can be used to rule out countries that we already know are slow for a particular user, because of the location. Typically (but not always though) far away countries respond quite much slower than near by countries. It also means that updating system with far away countries is much slower.

    Quality and speed are measured by remirror during ranking. Mirrors that have old contents are discarded. Mirrors that fail in downloading a test file are discarded.
    Finally, mirrors (that succeeded the test) are ordered only by their speed when writing the mirror lists to /etc/pacman.d.

  • Note that you may rank all mirrors for Antergos and only selected mirrors for Arch, for example:

    remirror --save=yes --c-arch=Germany,Netherlands

    This took 1 minutes 25 seconds.

  • @manuel said in New package: remirror (obsoletes reflector-antergos):

    remirror --save=yes --c-arch=Germany,Netherlands

    perfect! :)

  • remirror --save=yes --p=https --c-arch=Germany
  • @joekamprad
    That’s even better! No need to check http mirrors (even though they respond more quickly, https is the way to go).

  • Now remirror (version 0.1.23) ranks, by default, only https mirrors. It can be changed with option --p.

    So, a typical example (for people in Germany!) of using remirror is:

    remirror --save=yes --c-arch=Germany

    This ranks all known https mirrors for Antergos, and all German https mirrors for Arch. This is a kind of compromise between speed and coverage – there is a vast amount of Arch mirrors compared to Antergos mirrors. We can greatly speed up the process simply by reducing the number of ranked Arch mirrors.

  • Hi all!
    Now remirror has some new features:

    1. support for config file /etc/remirror.conf
    2. systemd service timer for periodic mirror updating
    3. new option --version to show the current version

    The systemd service timer provides the ability to update mirrors automatically once a week.

    The config file can contain two variables: REMIRROR_PREOPTIONS and REMIRROR_POSTOPTIONS. They can include any remirror command line options.
    The variables can be used e.g. for speeding up the ranking process by limiting the list of countries to rank.

    Example /etc/remirror.conf:

    REMIRROR_PREOPTIONS="--p=https --save=yes"
    REMIRROR_POSTOPTIONS="--c-antergos=France,Germany --c-arch=Germany,Netherlands"

    As you already know, remirror is preferred over reflector-antergos. I urge all reflector-antergos users to start using remirror instead.

    Please see https://github.com/manuel-192/remirror for more info!

    EDIT 2018-12-10: set the following permissions to the config file /etc/remirror.conf:

    sudo chmod 0644 /etc/remirror.conf

    Then a regular user can also use it.

  • variables from file /etc/remirror.conf

    how to write them? as i got command not found if i put REMIRROR_PREOPTIONS

    ah i do a typo… i do not add ="" ✍

  • @joekamprad
    Yes… as the config file is actually a bash script, the quotes are required since there may be many options.

  • Happy New Year!

    A new release of remirror is out!

    Now remirror 0.1.40 includes a new option --x which can be used for excluding given mirrors from the ranking process. This is useful if some mirror(s) are known to be poorly updated and thus not wanted for ranking. And it saves a bit time, too!

  • Remirror didn’t show up in Pamac for me. I had to download it from Github and build it. I did this yesterday before I even knew of this discussion.

remirror1 Posts 92Views 2341
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.