!IfWGAQbvNQUOtwPgmB:matrix.org

[FR] Archlinux

78 Members
Salon francophone dédié à l'entraide sur Archlinux et ses dérivés comme Manjaro, Archlinux32 et autre [ archlinux manjaro archlinux32 fr french français francais francophone linux aide entraide troll ou pas ]22 Servers

Load older messages


Timestamp Message
1 Apr 2020
15:11:09@costalfy:matrix.orgcostalfy__ça a l'air d'être le tronc commun https://wiki.archlinux.org/index.php/DeveloperWiki:NewMirrors#Mirror_size
15:12:04@t0:mux.reT0MuXoh merde
15:12:07@t0:mux.reT0MuXeffectivement
15:12:23@bobfett:flobob.ovhbobfettet faire avec un cache ça ne serait pas mieux ?
15:15:25@t0:mux.reT0MuXChéPô
15:19:00@t0:mux.reT0MuXmagnifique :D
15:19:04@t0:mux.reT0MuX costalfy__: je te montre mon script
15:20:57@t0:mux.reT0MuX

costalfy__:

#!/bin/bash
#
########
#
# Copyright © 2014-2019 Florian Pritz <bluewind@xinu.at>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
########
#
# This is a simple mirroring script. To save bandwidth it first checks a
# timestamp via HTTP and only runs rsync when the timestamp differs from the
# local copy. As of 2016, a single rsync run without changes transfers roughly
# 6MiB of data which adds up to roughly 250GiB of traffic per month when rsync
# is run every minute. Performing a simple check via HTTP first can thus save a
# lot of traffic.

# Directory where the repo is stored locally. Example: /srv/repo
target="/volume1/repomux/manjaro"

# Directory where files are downloaded to before being moved in place.
# This should be on the same filesystem as $target, but not a subdirectory of $target.
# Example: /srv/tmp
tmp="/volume1/repomux/manjaro-tmp"

# Lockfile path
lock="/volume1/repomux/manjaro.lck"

# If you want to limit the bandwidth used by rsync set this.
# Use 0 to disable the limit.
# The default unit is KiB (see man rsync /--bwlimit for more)
bwlimit=0

# The source URL of the mirror you want to sync from.
# If you are a tier 1 mirror use rsync.archlinux.org, for example like this:
# rsync://rsync.archlinux.org/ftp_tier1
# Otherwise chose a tier 1 mirror from this list and use its rsync URL:
# https://www.archlinux.org/mirrors/
source_url='rsync://mirror.yandex.ru/mirrors/manjaro'

# An HTTP(S) URL pointing to the 'lastupdate' file on your chosen mirror.
# If you are a tier 1 mirror use: http://rsync.archlinux.org/lastupdate
# Otherwise use the HTTP(S) URL from your chosen mirror.
lastupdate_url='https://mirror.yandex.ru/mirrors/manjaro/state'

# MANJARO SPECIFIC
# Let values to 0 if you do not use those branches.
staging=0 # stable-staging
testing=0
unstable=0

# Let value to 0 if you don't use aarch64 (only the x86_64 arch will be sync)
aarch64=0

#### END CONFIG

[ ! -d "${target}" ] && mkdir -p "${target}"
[ ! -d "${tmp}" ] && mkdir -p "${tmp}"

exec 9>"${lock}"
flock -n 9 || exit

rsync_cmd() {
  local -a cmd=(rsync -rtlH --safe-links --delete-after ${VERBOSE} "--timeout=600" "--contimeout=60" -p --delay-updates --no-motd "--temp-dir=${tmp}")

  if stty &>/dev/null; then
   cmd+=(-h -v --progress)
  else
   cmd+=(--quiet)
  fi

  if ((bwlimit>0)); then
   cmd+=("--bwlimit=$bwlimit")
  fi

  if [ $staging -eq 0 ]; then
   cmd+=("--exclude=stable-staging")
  fi

  if [ $testing -eq 0 ]; then
   cmd+=("--exclude=testing")
  fi

  if [ $unstable -eq 0 ]; then
   cmd+=("--exclude=unstable")
  fi

  if [ $aarch64 -eq 0 ]; then
   cmd+=("--exclude=aarch64")
   cmd+=("--exclude=arm-testing")
   cmd+=("--exclude=arm-unstable")
   cmd+=("--exclude=arm-stable")
   cmd+=("--exclude=overlay-arm")
   cmd+=("--exclude=sync-arm")
fi

  "${cmd[@]}" "$@"
}

# if we are called without a tty (cronjob) only run when there are changes
if ! tty -s && [[ -f "$target/state" ]] && diff -b <(curl -Ls "$lastupdate_url") "$target/state" >/dev/null; then

# keep lastsync file in sync for statistics generated by the Arch Linux website
rsync_cmd "$source_url/state" "$target/state"
exit 0
fi

rsync_cmd --exclude='*.links.tar.gz*' --exclude='/other' --exclude='/sources' --exclude='/iso' "${source_url}" "${target}"

#echo "Last sync was $(date -d @$(cat ${target}/lastsync))"

15:21:20@t0:mux.reT0MuXj'ai rajouté le bloc ### MANJARO SPECIFIC ###
15:21:43@t0:mux.reT0MuXet les if à partir de $staging jusqu'à la fin
15:22:08@t0:mux.reT0MuX et là j'ai viré : aarch64, tous les dossiers arm, et toutes les branches que je n'utilise pas 🙂
15:22:16@t0:mux.reT0MuX47Go
15:23:52@costalfy:matrix.orgcostalfy__ Oô yandex.ru est plus rapide chez toi T0MuX ?
15:24:45@t0:mux.reT0MuX costalfy__: oui, visiblement
15:24:55@t0:mux.reT0MuXen tout cas c'est celui qui supporte rsync et qui est le plus rapide
15:25:01@t0:mux.reT0MuXfaut pas l'utiliser en journée quoi...
15:25:14@t0:mux.reT0MuXje l'ai cron'd à 4h AM ça devrait aller
15:25:18@t0:mux.reT0MuXet Archlinux à 5h
15:25:33@t0:mux.reT0MuXtiens et ça c'est mon index.html du dépot
15:25:37@t0:mux.reT0MuX
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>

<body>
Ceci est un dépot local pour Archlinux et Manjaro Linux. À mettre dans mirrorlist :<br><br>
<table>
<tr>
 <td><a href=./archlinux>Archlinux</a></td>
 <td>http://192.168.1.250:8000/archlinux/$repo/os/$arch</td>
</tr>
<tr>
 <td><a href=./manjaro>Manjaro</a></td>
 <td>http://192.168.1.250:8000/manjaro/manjaro/stable/$repo/$arch</td>
</tr>
</table>
</body>
15:29:15@costalfy:matrix.orgcostalfy__merci... c'est cool de voir que mon article a servi a qlq'un ^^
15:31:19@t0:mux.reT0MuXbin carrément 🙂 quand j'ai vu ça j'ai sauté sur l'occasion
15:31:30@t0:mux.reT0MuXje m'étais toujours demandé comment on fait un mirroir en plus
15:31:46@t0:mux.reT0MuXc'était une occasion d'apprendre, et d'accélerer mes mises à jour en pratique
15:32:01@t0:mux.reT0MuXsurtout au moment ou moi je les demande
15:32:26@t0:mux.reT0MuXet comme je disais, 90% de mes machines sont en archlinux ou manjaro, les 10% restant c'est une alpine et une archlinux32
3 Apr 2020
14:19:13@cequejevois:matrix.orgcequejevois joined the room.
15:53:09@julie2819:matrix.org@julie2819:matrix.org joined the room.
15:53:31@julie2819:matrix.org@julie2819:matrix.orgComment ça fonctionne?
4 Apr 2020
03:34:47@julie2819:matrix.org@julie2819:matrix.org left the room.

There are no newer messages yet.


Back to Room List