Update IDF for download verification
[tails.git] / bin / announce-and-seed-torrents
bloba198154f8337ebaa170f0478db76086a3ebf2ef6
1 #!/bin/bash
3 set -eu
4 set -x
6 ssh bittorrent.lizard gpg --import \
7 < "${RELEASE_CHECKOUT:?}/wiki/src/tails-signing.key"
9 for type in iso img ; do
10 image_filename="tails-amd64-${VERSION:?}.${type:?}"
11 torrent_dirname="tails-amd64-${VERSION:?}-${type:?}"
12 rsync --copy-links \
13 "${ISOS:?}/${image_filename:?}.torrent" \
14 "${ISOS:?}/tails-amd64-${VERSION:?}/${image_filename:?}.sig" \
15 "bittorrent.lizard:${torrent_dirname}/"
17 # shellcheck disable=SC2087
18 ssh bittorrent.lizard <<-EOF
20 set -eu
21 chmod 0775 "${torrent_dirname:?}"
22 cd "${torrent_dirname:?}"
23 wget --no-verbose --continue \
24 "https://nightly.tails.boum.org/build_Tails_ISO_${RELEASE_BRANCH:?}/builds/${MATCHING_JENKINS_IMAGES_BUILD_ID:?}/archive/build-artifacts/${image_filename:?}"
25 gpg --verify ${image_filename:?}{.sig,}
27 chgrp -R debian-transmission "${torrent_dirname:?}"
28 chmod -R go+rX,g+w "${torrent_dirname:?}"
29 mv \
30 "${torrent_dirname:?}" \
31 /var/lib/transmission-daemon/downloads/
32 transmission-remote --add /var/lib/transmission-daemon/downloads/${torrent_dirname}/${image_filename:?}.torrent \
33 --find /var/lib/transmission-daemon/downloads/
34 transmission-remote --list
36 EOF
37 done