You are not logged in.

#151 Today 12:52:28

adventurer
Member
Registered: 2014-05-04
Posts: 128

Re: Xyne's repos: news and discussion

Yes, it is a pity that there is no contact with Xyne anymore. Fortunately, there are alternatives available.

FWIW, I'm using the following script:

#!/bin/sh


# Mirrorlist status from the last 24 hours.
URL='https://archlinux.org/mirrors/status/json/'

# Return only secure mirrors from selected countries.
FILTER='.urls | [.[] | select(.protocol == "https")]
              | [.[] | select(.completion_pct == 1.0)]
              | [.[] | select(.score <= 1.0)]
              | [.[] | select(.delay <= 3600)]
              | [.[] | select(.country_code == "", .country_code == "DE", .country_code == "AT", .country_code == "GB",
                              .country_code == "SE", .country_code == "FR", 
                              .country_code == "BE", .country_code == "NL")]
              | .[] | "## \(.country)\nServer = \(.url)$repo/os/$arch"'

# Fetch and filter the mirrors, then rank them by connection and opening speed.
curl -qs "$URL" | jaq -r "$FILTER" | rankmirrors -p -m 3 -w -n 10 -v - > /tmp/mirrorlist

# Fail-check: make sure the new mirrorlist is not empty.
if [ -s /tmp/mirrorlist ]; then
   # Backup previous mirrorlist and move over the new one.
   if [ -f "/etc/pacman.d/mirrorlist" ]; then sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-backup; fi
   sudo mv /tmp/mirrorlist /etc/pacman.d/mirrorlist

   # Remove mirrorlist.pacnew created during pacman-mirrorlist upgrade.
   if [ -f "/etc/pacman.d/mirrorlist.pacnew" ]; then sudo rm /etc/pacman.d/mirrorlist.pacnew;fi
   
else
   printf '%s\n' "Built an EMTPY mirrorlist, check the script's filters. The old mirrorlist was NOT replaced!"
fi

sudo chown -c root /etc/pacman.d/mirrorlist
echo
cat /etc/pacman.d/mirrorlist

exit 0

This works well for me. Needless to say that you should adjust the country codes and possibly other criteria to your needs.

Offline

Board footer

Powered by FluxBB