5 Apr 2020 |
solsTiCedHiver | T0MuX: salut. je voulais me faire un repo aussi, mais quand j'ai vu la taille requise j'ai laissé tombé. Tu arrives à combien sans -*testing et *-staging ? | 10:49:32 |
T0MuX | solsticedhiver: yo tu parles de Manjaro ?
| 11:39:13 |
solsTiCedHiver | archlinux en fait | 11:39:37 |
T0MuX | ah bin je l'ai pas "trié" celui la
| 11:39:58 |
T0MuX | J'suis à 45Go | 11:40:05 |
solsTiCedHiver | ok. il me faudrait 3 repo. x86-64, armv6h, armv7h ... | 11:43:10 |
solsTiCedHiver | c'est compliqué de trier en virant *-statging, *-testing. il faut lire la db, et virer seulement les paquets dans pool si j'ai bien compris | 12:12:26 |
solsTiCedHiver | bon je vais essayé https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Network_shared_pacman_cache la sol la plus simple | 12:31:23 |
solsTiCedHiver | ca marche pas. à cause de darkhttpd je crois. il ne voit pas une maj de la .db | 13:45:49 |
| @cequejevois:matrix.org left the room. | 21:35:46 |
6 Apr 2020 |
T0MuX |
c'est compliqué de trier en virant *-statging, *-testing. il faut lire la db, et virer seulement les paquets dans pool si j'ai bien compris
Non c'est facile :) tu rajoutes --exclude à ton rsync
| 06:32:18 |
T0MuX | solsticedhiver:
#!/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/archlinux"
# 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/archlinux-tmp"
# Lockfile path
lock="/volume1/repomux/archlinux.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://archlinux.mailtunnel.eu/archlinux/'
# 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://archlinux.mailtunnel.eu/lastupdate'
# Let value to 0 if you don't use those branches
unstable=0
testing=0
staging=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 [ $unstable -eq 0 ]; then
cmd+=("--exclude unstable")
fi
if [ $unstable -eq 0 ]; then
cmd+=("--exclude unstable")
fi
if [ $unstable -eq 0 ]; then
cmd+=("--exclude unstable")
fi
"${cmd[@]}" "$@"
}
# if we are called without a tty (cronjob) only run when there are changes
if ! tty -s && [[ -f "$target/lastupdate" ]] && diff -b <(curl -Ls "$lastupdate_url") "$target/lastupdate" >/dev/null; then
# keep lastsync file in sync for statistics generated by the Arch Linux website
rsync_cmd "$source_url/lastsync" "$target/lastsync"
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))"
| 07:09:18 |
solsTiCedHiver | T0MuX: ouais déjà y'a un problème ave ton script. y'a 3 fois le même snippet. Il faut changer la variable unstable en stating et testing. if [ $unstable -eq 0 ]; then cmd+=("--exclude unstable") fi
if [ $unstable -eq 0 ]; then cmd+=("--exclude unstable") fi
if [ $unstable -eq 0 ]; then cmd+=("--exclude unstable") fi
| 10:14:44 |
solsTiCedHiver | * T0MuX: ouais déjà y'a un problème ave ton script. y'a 3 fois le même snippet. Il faut changer la variable unstable en stating et testing.
cmd+=("--exclude unstable")
fi
if [ $staging -eq 0 ]; then
cmd+=("--exclude staging")
fi
if [ $testing -eq 0 ]; then
cmd+=("--exclude testing")
fi```
| 10:15:29 |
solsTiCedHiver | * T0MuX: ouais déjà y'a un problème ave ton script. y'a 3 fois le même snippet. Il faut changer la variable unstable en stating et testing.
if
cmd+=("--exclude unstable")
fi
if [ $staging -eq 0 ]; then
cmd+=("--exclude staging")
fi
if [ $testing -eq 0 ]; then
cmd+=("--exclude testing")
fi```
| 10:15:59 |
solsTiCedHiver | * T0MuX: ouais déjà y'a un problème ave ton script. y'a 3 fois le même snippet. Il faut changer la variable unstable en stating et testing.
if [ $unstable -eq 0 ]; then
cmd+=("--exclude unstable")
fi
if [ $staging -eq 0 ]; then
cmd+=("--exclude staging")
fi
if [ $testing -eq 0 ]; then
cmd+=("--exclude testing")
fi```
| 10:16:24 |
solsTiCedHiver | déjà. | 10:16:37 |
solsTiCedHiver | et puis si comme tu le disais tous les fichiers sont dans /pool, ca va pas régler le problème. Reste à savoir si dans quel sens sont les symlink ? vers /pool ou depuis /pool ? | 10:17:41 |
solsTiCedHiver | je vais pas essayer un rsync à 20GB juste pour voir :-) | 10:18:01 |
solsTiCedHiver | donc je crois que je vais essayer la solution suivante pacredir | 10:18:22 |
solsTiCedHiver | * donc je crois que je vais essayer la solution suivante pacredir | 10:18:32 |
solsTiCedHiver | * T0MuX: ouais déjà y'a un problème ave ton script. y'a 3 fois le même snippet. Il faut changer la variable unstable en stating et testing.
<pre class="langague-sh">
if [ $unstable -eq 0 ]; then
cmd+=("--exclude unstable")
fi
if [ $staging -eq 0 ]; then
cmd+=("--exclude staging")
fi
if [ $testing -eq 0 ]; then
cmd+=("--exclude testing")
fi
</pre> | 10:23:26 |
solsTiCedHiver | * T0MuX: ouais déjà y'a un problème ave ton script. y'a 3 fois le même snippet. Il faut changer la variable unstable en stating et testing.
<pre class="langague-sh">
if [ $unstable -eq 0 ]; then
cmd+=("--exclude unstable")
fi
if [ $staging -eq 0 ]; then
cmd+=("--exclude staging")
fi
if [ $testing -eq 0 ]; then
cmd+=("--exclude testing")
fi
</pre>
| 10:23:41 |
solsTiCedHiver | * T0MuX: ouais déjà y'a un problème ave ton script. y'a 3 fois le même snippet. Il faut changer la variable unstable en stating et testing.
<pre class="langague-sh">
if [ $unstable -eq 0 ]; then
cmd+=("--exclude unstable")
fi
if [ $staging -eq 0 ]; then
cmd+=("--exclude staging")
fi
if [ $testing -eq 0 ]; then
cmd+=("--exclude testing")
fi
</pre>
| 10:23:49 |
solsTiCedHiver | * T0MuX: ouais déjà y'a un problème ave ton script. y'a 3 fois le même snippet. Il faut changer la variable unstable en stating et testing.
if [ $unstable -eq 0 ]; then
cmd+=("--exclude unstable")
fi
if [ $staging -eq 0 ]; then
cmd+=("--exclude staging")
fi
if [ $testing -eq 0 ]; then
cmd+=("--exclude testing")
fi
| 10:24:09 |
T0MuX | En réponse à@solsticedhiver:matrix.org
T0MuX: ouais déjà y'a un problème ave ton script. y'a 3 fois le même snippet. Il faut changer la variable unstable en stating et testing.
if [ $unstable -eq 0 ]; then
cmd+=("--exclude unstable")
fi
if [ $staging -eq 0 ]; then
cmd+=("--exclude staging")
fi
if [ $testing -eq 0 ]; then
cmd+=("--exclude testing")
fi
Ah oui merde | 10:29:17 |
T0MuX | je corrigr | 10:29:27 |
solsTiCedHiver | lol. donc en fait t'as tout téléchargé ? T'as pas vérifié ? | 11:04:00 |
☮ 🐦 Fanch The System (Not Often Used) 🖕 | c'est ps son genre ;) | 11:28:10 |
☮ 🐦 Fanch The System (Not Often Used) 🖕 | * c'est pas son genre ;) | 11:28:15 |