From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E5B0A158041 for ; Thu, 28 Mar 2024 16:12:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4ED292BC019; Thu, 28 Mar 2024 16:12:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2EBCA2BC019 for ; Thu, 28 Mar 2024 16:12:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0686C34302C for ; Thu, 28 Mar 2024 16:12:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3903A1601 for ; Thu, 28 Mar 2024 16:12:54 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1711637802.e766d7ea7dae4c0f454a3e3a69f2f6bb3aba5ec8.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/rsync-generation/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/rsync-generation/push-rsync1.sh X-VCS-Directories: scripts/rsync-generation/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: e766d7ea7dae4c0f454a3e3a69f2f6bb3aba5ec8 X-VCS-Branch: master Date: Thu, 28 Mar 2024 16:12:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a2c8f188-f477-4a4a-8148-ae20ee5da762 X-Archives-Hash: 717f3a2b44b1d86ea180eb23962f5584 commit: e766d7ea7dae4c0f454a3e3a69f2f6bb3aba5ec8 Author: Fabian Groffen gentoo org> AuthorDate: Thu Mar 28 14:56:42 2024 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Thu Mar 28 14:56:42 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e766d7ea scripts/rsync-generation/push-rsync1: update to current usage Signed-off-by: Fabian Groffen gentoo.org> scripts/rsync-generation/push-rsync1.sh | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/scripts/rsync-generation/push-rsync1.sh b/scripts/rsync-generation/push-rsync1.sh index fc15894ecd..c9df9a379d 100755 --- a/scripts/rsync-generation/push-rsync1.sh +++ b/scripts/rsync-generation/push-rsync1.sh @@ -1,25 +1,23 @@ #!/usr/bin/env bash -TRGDIR="rsync1.domain::rsync-push_module" +TRGDIR="/path/to/rsync0-prefix-tree" LOCALDIR="/path/to/master-rsync-tree" -# figure out what's currently the active rsync1 mirror -#active=$(ssh $TRGHOST "readlink $TRGDIR/rsync1") -#echo "($(date +"%F %R")) current active snapshot on rsync1: ${active}" - -#case $active in -# rsync1a) target=rsync1b ;; -# rsync1b) target=rsync1a ;; -# *) -# echo "don't know what the active rsync1 mirror is: '$active'" > /dev/stderr -# exit 1 -# ;; -#esac -echo "($(date +"%F %R")) will refresh and activate snapshot: ${target}" +echo "($(date +"%F %R")) will refresh snapshot" # synchronise the target -rsync -va --delete "${LOCALDIR}"/ ${TRGDIR}/ > /var/tmp/rsync-updates.log || exit 1 +rsync -vca --delete --exclude=snapshots/ \ + "${LOCALDIR}"/ ${TRGDIR}/ > /var/tmp/rsync-updates.log || exit 1 +PUBLICDIR= +case $(hostname) in + disabled) + PUBLICDIR="somehost::gentoo-portage-prefix-push" + ;; +esac # switch the active rsync1 mirror -echo "($(date +"%F %R")) rsync done, switching target now" -#ssh $TRGHOST "cd ${TRGDIR} && rm rsync1 && ln -s ${target} rsync1" +if [[ -n ${PUBLICDIR} ]] ; then + rsync -vca --delete "${TRGDIR}"/ "${PUBLICDIR}"/ +fi + +echo "($(date +"%F %R")) rsync done"