diff --git a/.github/workflows/hashes.yaml b/.github/workflows/hashes.yaml index 4c15e31a09..806145dc5a 100644 --- a/.github/workflows/hashes.yaml +++ b/.github/workflows/hashes.yaml @@ -155,6 +155,7 @@ jobs: while read line; do [ -z "$line" ] && continue url=$(echo $line | cut -d'|' -f1) + [[ "$url" == *torrent ]] && continue hash=$(echo $line | cut -d'|' -f2) filename= case $url in @@ -206,8 +207,8 @@ jobs: cp monero-source-${version_cli}.tar.bz2 yours/. mkdir from_website echo -e "\n--> Move tarballs from getmonero..." - mv ../monero-gui-source-${version_gui}.tar.bz2 from_website/. - mv ../monero-source-${version_cli}.tar.bz2 from_website/. + cp ../monero-gui-source-${version_gui}.tar.bz2 from_website/. + cp ../monero-source-${version_cli}.tar.bz2 from_website/. echo -e "\n--> Unpacking all..." bunzip2 yours/*.bz2 bunzip2 from_website/*.bz2 @@ -220,3 +221,92 @@ jobs: diff -r yours/monero-source-$version_cli from_website/monero-source-$version_cli echo -e "\n--> Comparing GUI directories" diff -r yours/monero-gui-source-$version_gui from_website/monero-gui-source-$version_gui + - name: Verify torrent + magnet links + webseed + run: | + sudo apt-get install -y --no-install-recommends transmission-cli + + version_gui=$(awk '/monero-gui-source-v/ {print $2}' downloads/hashes.txt | awk -F".tar.bz2" '{print $1}' | awk -F"-" '{print $4}') + version_cli=$(awk '/monero-source-v/ {print $2}' downloads/hashes.txt | awk -F".tar.bz2" '{print $1}' | awk -F"-" '{print $3}') + + git clone --recurse-submodules https://github.com/plowsof/monero-torrent.git + cd monero-torrent + git reset --hard 761738fd9f0d60fe655276989648a98ba6ab8188 + cd .. + + # move files for local build of torrent (requires files to be in a folder named cdn) + mkdir monero-torrent/cdn + grep monero- downloads/hashes.txt | awk '{print $2}' | while read -r f; do + mv "$f" monero-torrent/cdn + done + wget https://raw.githubusercontent.com/monero-project/monero/master/utils/gpg_keys/binaryfate.asc + mv binaryfate.asc monero-torrent/cdn + mv downloads/hashes.txt monero-torrent/cdn + + # get magnet links from downloads.yml + YML_MAGNET_LINK_CLI=$(yq -r '.cli[0].downloads[] | select(.platform=="Torrent") | .magnet' _data/downloads.yml) + YML_MAGNET_LINK_GUI=$(yq -r '.gui[0].downloads[] | select(.platform=="Torrent") | .magnet' _data/downloads.yml) + # create torrent files + cd monero-torrent + docker compose --profile local up --build + + MAGNET_LINK_CLI=$(transmission-show -m watch/monero-$version_cli.torrent) + MAGNET_LINK_GUI=$(transmission-show -m watch/monero-gui-$version_gui.torrent) + + # confirm docker and .yml magnet links match + if [[ "$MAGNET_LINK_CLI" != "$YML_MAGNET_LINK_CLI" ]]; then + echo "CLI mismatch!" + echo "DEBUG: MAGNET_LINK_CLI: $MAGNET_LINK_CLI" + echo "DEBUG: YML_MAGNET_LINK_CLI: $YML_MAGNET_LINK_CLI" + exit 1 + fi + if [[ "$MAGNET_LINK_GUI" != "$YML_MAGNET_LINK_GUI" ]]; then + echo "GUI mismatch!" + echo "DEBUG: MAGNET_LINK_GUI: $MAGNET_LINK_GUI" + echo "DEBUG: YML_MAGNET_LINK_GUI: $YML_MAGNET_LINK_GUI" + exit 1 + fi + + # confirm docker and cdn magnet links match + #CDN_LINK_CLI="https://dlsrc.getmonero.org/monero-$version_cli.torrent" + #CDN_LINK_GUI="https://dlsrc.getmonero.org/monero-gui-$version_gui.torrent" + # TODO: download from monero-torrent repo for testing, replace with above dlsrc link in production + CDN_LINK_CLI="https://github.com/plowsof/monero-torrent/releases/download/v0.18.4.4/monero-v0.18.4.4.torrent" + CDN_LINK_GUI="https://github.com/plowsof/monero-torrent/releases/download/v0.18.4.4/monero-gui-v0.18.4.4.torrent" + wget $CDN_LINK_CLI + wget $CDN_LINK_GUI + CDN_MAGNET_LINK_CLI=$(transmission-show -m monero-$version_cli.torrent) + CDN_MAGNET_LINK_GUI=$(transmission-show -m monero-gui-$version_gui.torrent) + + if [[ "$MAGNET_LINK_CLI" != "$CDN_MAGNET_LINK_CLI" ]]; then + echo "CLI mismatch!" + echo "DEBUG: MAGNET_LINK_CLI: $MAGNET_LINK_CLI" + echo "DEBUG: CDN_MAGNET_LINK_CLI: $CDN_MAGNET_LINK_CLI" + exit 1 + fi + if [[ "$MAGNET_LINK_GUI" != "$CDN_MAGNET_LINK_GUI" ]]; then + echo "GUI mismatch!" + echo "DEBUG: MAGNET_LINK_GUI: $MAGNET_LINK_GUI" + echo "DEBUG: CDN_MAGNET_LINK_GUI: $CDN_MAGNET_LINK_GUI" + exit 1 + fi + + # confirm versioned hashes file and webseed url redirects are working + CDN_URL="https://downloads.getmonero.org" + if ! wget --spider -q "$CDN_URL/hashes-$version_cli.txt"; then + echo "::warning title=Torrent-Webseed-URLs::FAILED: $CDN_URL/hashes-$version_cli.txt" + fi + if ! wget --spider -q "$CDN_URL/hashes-$version_gui.txt"; then + echo "::warning title=Torrent-Webseed-URLs::FAILED: $CDN_URL/hashes-$version_gui.txt" + fi + for file in $(awk '/monero-/ {print $2}' "downloads/hashes.txt"); do + dir=cli + part="monero-$version_cli" + if [[ $file =~ gui ]]; then + dir=gui + part="monero-gui-$version_gui" + fi + url=$CDN_URL/${part}/${dir}/${file} + if ! wget --spider -q "$url"; then + echo "::warning title=Torrent-Webseed-URLs::FAILED: $url" + fi + done diff --git a/_data/downloads.yml b/_data/downloads.yml index c74091c79e..80358d3196 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -35,6 +35,12 @@ gui: - platform: Source Code link: https://github.com/monero-project/monero-gui icon: icon-github + - platform: Torrent + link: https://downloads.getmonero.org/gui/torrent + magnet: 'magnet:?xt=urn:btih:23382953943b4fa023d6b7c72375a26dc8ce02b6&dn=monero-gui-v0.18.4.4&ws=https%3A%2F%2Fdownloads.getmonero.org%2F' + icon: icon-torrent + vers: + cli: @@ -107,3 +113,8 @@ cli: - platform: Source Code link: https://github.com/monero-project/monero icon: icon-github + - platform: Torrent + link: https://downloads.getmonero.org/cli/torrent + magnet: 'magnet:?xt=urn:btih:9c7b39bfb11abcffc869480efb8eafec7bdd1b87&dn=monero-v0.18.4.4&ws=https%3A%2F%2Fdownloads.getmonero.org%2F' + icon: icon-torrent + vers: diff --git a/_i18n/en.yml b/_i18n/en.yml index 3002e44e71..f9d74fc7ec 100644 --- a/_i18n/en.yml +++ b/_i18n/en.yml @@ -282,7 +282,7 @@ downloads: mobile: Mobile desktop: Desktop antivirus: Antivirus - sourcearchive: Source Code (archive) + sourcearchive: Archive localsync: Local synchronization localsyncinfo: These wallets connect to @remote-nodes and scan the @blockchain on your device, without sharing any key with the nodes. They provide higher privacy, but require more time synchronizing, since missing @blocks will be scanned only when the wallet is opened. remotesync: Remote synchronization (lightweight) diff --git a/css/custom.css b/css/custom.css index ef8089cab2..8cbce8f481 100644 --- a/css/custom.css +++ b/css/custom.css @@ -1012,6 +1012,18 @@ a[href^="https:"]:not([href*="getmonero.org"]).orange { /* END External link icon */ +/* Magnet link icon */ + +a[href^="magnet:"]:not([class*="ext-noicon"]) { + display: inline-block; + background: url(/img/magnet.avif) no-repeat right top; + padding-right: 0.7em; + margin-right: 0.3rem; + background-size: 0.6em; +} + +/* END Magnet link icon */ + a:hover, a:focus, a:active { outline: 0; } @@ -3312,6 +3324,14 @@ span.icon-git { background-position: -94px -140px; } +span.icon-torrent { + background-image: url(../img/download.avif); + width: 31px; + height: 29px; + background-size: contain; + background-repeat: no-repeat; +} + .downloads a.ext-noicon { border-bottom: none; } diff --git a/downloads/index.md b/downloads/index.md index 8f47bd776f..70100f6e04 100644 --- a/downloads/index.md +++ b/downloads/index.md @@ -78,15 +78,23 @@ meta_descr: downloads.intro
@@ -96,7 +104,11 @@ meta_descr: downloads.intro

{% t downloads.currentversion %}: {{ entry.vers }}

{% endif %} @@ -171,15 +183,23 @@ meta_descr: downloads.intro
@@ -189,7 +209,11 @@ meta_descr: downloads.intro

{% t downloads.currentversion %}: {{ entry.vers }}

{% endif %} diff --git a/img/download.avif b/img/download.avif new file mode 100644 index 0000000000..2e3297ef3d Binary files /dev/null and b/img/download.avif differ diff --git a/img/magnet.avif b/img/magnet.avif new file mode 100644 index 0000000000..9b4b5e682d Binary files /dev/null and b/img/magnet.avif differ