[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] sync-release: script to sync dists/<suite>



With the release team moving away from ftp-master, we need some way to
send them the dists/<suite> tree.  This script makes it easy to sync it
to a staging location.
---
 .../homedir/ssh/ftpmaster-mirror-authorized_keys   |  1 +
 scripts/debian/sync-release                        | 52 ++++++++++++++++++++++
 2 files changed, 53 insertions(+)
 create mode 100755 scripts/debian/sync-release

diff --git a/config/homedir/ssh/ftpmaster-mirror-authorized_keys b/config/homedir/ssh/ftpmaster-mirror-authorized_keys
index 8636f24..ed20c7e 100644
--- a/config/homedir/ssh/ftpmaster-mirror-authorized_keys
+++ b/config/homedir/ssh/ftpmaster-mirror-authorized_keys
@@ -1,3 +1,4 @@
 # keys for scripts/debian/dd-sync
 command="rsync --server -lHogDtpre.iLsf -B8192 --timeout=3600 --delete-after . /srv/ftp-master.debian.org/" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbFGM5hCwuWz5kVJUAA0lrDb6xJgiHXsGGSnRHJLePRgq06xJbEhLKUpYYNTj928PIYEEWQJb9nZaoRgTgS59aVeo5zt3qT8fGkuB4/XE+qaRWBlWXXaR/DdHh4gNLIws6D8Duny6M/ewrtaOLNca5i2Il9NBSrBrefocZHyoN6fTb2uwXOx8uJ/klcUeVUt+DZNmkF/j9VymmZ+g2892efGrwkcyY42u90xJK+VSHOQBqkRk5eObup5oUNBZr5+WI+GXop9CKy06o/a0KvgIUIBI03zq9zzgIySii/h1YR6YmVgJUUWFc3efap0oOTVVw56Re0QHRdDx+RZZ/5HSl rsync DD-accessible copy of /srv/ftp-master.debian.org, 2012-10-07
 command="rsync --server -lHogDtpre.iLsf -B8192 --timeout=3600 --delete-after . /srv/ftp.debian.org/" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSgqmVlgeILSLTE8hHwh5AckbuBf7Dv5n8m5EZFyKzed1Cf7HhOwO/33MNNcR5zl30c3/uZRNXpPLevrGX1vkiEEZ/ddlD/70oEQHS/Ms4pvxikeNO0aVCWQoX2xqR2bZqvRqH5HFr3MUY8PXbD6BLkf2teuc1UNAjsvFQLESKLBp3dONl8jJqdB9QMnmg6rmgeBffN6bogr08TNm+R3t6+6yx7okueh4PZY3eUSBzhelAb/5/3UrSFitM4qFA1Ah/jJe6ZXPF/9QAj97KV2v5iKdpQsFEjXYjtFBn/Yu1kWm6sEH4ki0RZFV7rWidaWu7hW/9emNFVKYj1xXPebk/ rsync DD-accessible copy of /srv/ftp.debian.org/, 2012-10-07
+command="rsync --server -lHogDtpre.iLsfx -B8192 --timeout=3600 . /srv/ftp-master.debian.org/tmp-release/" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPwaMOXQR5SIhE1XlkF4m3vWVloD9tXmHG5n99MJyl7+ dak@franck.debian.org 2016-09-17 -- push dists/${suite} to host accessible by release team
diff --git a/scripts/debian/sync-release b/scripts/debian/sync-release
new file mode 100755
index 0000000..66fef0a
--- /dev/null
+++ b/scripts/debian/sync-release
@@ -0,0 +1,52 @@
+#! /bin/bash
+
+# Copyright (C) 2016, Ansgar Burchardt <ansgar@debian.org>
+#
+# 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; version 2.
+#
+# 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, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+set -e
+set -u
+set -E
+
+export LANG=C
+export LC_ALL=C
+
+export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
+. $SCRIPTVARS
+
+usage() {
+  echo "usage: $0 <suite>"
+  echo
+  echo "sync dists/<suite> to a location accessible by the release team"
+  echo "excluding irrelevant bits (such as installer images)"
+  exit ${1:-0}
+}
+
+if [ $# -ne 1 ]; then
+  usage
+fi
+
+suite="${1}"
+
+source="${ftpdir}/dists/${suite}"
+target="sync-release:/srv/ftp-master.debian.org/tmp-release/"
+
+rsync -aH -B8192 \
+  --exclude "/*/installer-*" \
+  --timeout 3600 \
+  -e 'ssh -o ConnectTimeout=30 -o SetupTimeout=30' \
+  "${source}" "${target}"
+
+# command for the remote side:
+# rsync --server -lHogDtpre.iLsfx -B8192 --timeout=3600 . /srv/ftp-master.debian.org/tmp-release/
-- 
2.1.4


Reply to: