Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 92 additions & 2 deletions .github/workflows/hashes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
11 changes: 11 additions & 0 deletions _data/downloads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
2 changes: 1 addition & 1 deletion _i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 20 additions & 0 deletions css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
40 changes: 32 additions & 8 deletions downloads/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,23 @@ meta_descr: downloads.intro
</div>
<div class="col-md-4 col-sm-4 col-xs-4 desktop-only">
<ul>
<li class="downloads"><span class="icon-github"></span><a class="orange" href="https://github.com/monero-project/monero-gui" target="_blank">{% t downloads.sourcecode %}</a></li>
<li class="downloads"><span class="icon-git"></span><a class="orange" href="https://downloads.getmonero.org/gui/source">{% t downloads.sourcearchive %}</a></li>
<li class="downloads"><span class="icon-github"></span><a class="orange" href="https://github.com/monero-project/monero-gui" target="_blank">{% t downloads.sourcecode %}</a> | <a class="orange" href="https://downloads.getmonero.org/gui/source">{% t downloads.sourcearchive %}</a></li>
<!-- do not draw torrent if version != latest release -->
{% assign torrent = item.downloads | where: "platform", "Torrent" | first %}
{% if torrent and torrent.vers == nil %}
<li class="downloads"><span class="icon-torrent"></span><a class="orange" href="{{ torrent.link }}">{{ torrent.platform }}</a> | <a class="orange" href="{{ torrent.magnet }}">Magnet</a></li>
{% endif %}
</ul>
</div>
<div class="mobile-only">
<ul class="nopadding">
{% for entry in item.downloads %}
{% unless entry.vers != nil %}
<li class="downloads"><span class="{{ entry.icon }}"></span><a class="orange" href="{{ entry.link }}">{{ entry.platform }}</a></li>
{% if entry.platform == "Torrent" %}
<li class="downloads"><span class="icon-torrent"></span><a class="orange" href="{{ torrent.link }}">{{ torrent.platform }}</a> | <a class="orange" href="{{ torrent.magnet }}">Magnet</a></li>
{% else %}
<li class="downloads"><span class="{{ entry.icon }}"></span><a class="orange" href="{{ entry.link }}">{{ entry.platform }}</a></li>
{% endif %}
{% endunless %}
{% endfor %}
</ul>
Expand All @@ -96,7 +104,11 @@ meta_descr: downloads.intro
<div class="col-md-12 col-sm-12 col-xs-12">
<p><i>{% t downloads.currentversion %}:</i> {{ entry.vers }}</p>
<ul>
<li class="downloads"><span class="{{ entry.icon }}"></span><a class="orange" href="{{ entry.link }}">{{ entry.platform }}</a></li>
{% if entry.platform == "Torrent" %}
<li class="downloads"><span class="icon-torrent"></span><a class="orange" href="{{ torrent.link }}">{{ torrent.platform }}</a> | <a class="orange" href="{{ torrent.magnet }}">Magnet</a></li>
{% else %}
<li class="downloads"><span class="{{ entry.icon }}"></span><a class="orange" href="{{ entry.link }}">{{ entry.platform }}</a></li>
{% endif %}
</ul>
</div>
{% endif %}
Expand Down Expand Up @@ -171,15 +183,23 @@ meta_descr: downloads.intro
<div class="col-md-4 col-sm-4 col-xs-4 desktop-only">
<ul>
<li class="downloads"><span class="icon-freebsd"></span><a class="orange" href="https://downloads.getmonero.org/cli/freebsd64">FreeBSD 64-bit</a></li>
<li class="downloads"><span class="icon-github"></span><a class="orange" href="https://github.com/monero-project/monero" target="_blank">{% t downloads.sourcecode %}</a></li>
<li class="downloads"><span class="icon-git"></span><a class="orange" href="https://downloads.getmonero.org/cli/source">{% t downloads.sourcearchive %}</a></li>
<li class="downloads"><span class="icon-github"></span><a class="orange" href="https://github.com/monero-project/monero" target="_blank">{% t downloads.sourcecode %}</a> | <a class="orange" href="https://downloads.getmonero.org/cli/source">{% t downloads.sourcearchive %}</a></li>
<!-- do not draw torrent if version != latest release -->
{% assign torrent = item.downloads | where: "platform", "Torrent" | first %}
{% if torrent and torrent.vers == nil %}
<li class="downloads"><span class="{{ torrent.icon }}"></span><a class="orange" href="{{ torrent.link }}">{{ torrent.platform }}</a> | <a class="orange" href="{{ torrent.magnet }}">Magnet</a></li>
{% endif %}
</ul>
</div>
<div class="mobile-only">
<ul class="nopadding">
{% for entry in item.downloads %}
{% unless entry.vers != nil %}
<li class="downloads"><span class="{{ entry.icon }}"></span><a class="orange" href="{{ entry.link }}">{{ entry.platform }}</a></li>
{% if entry.platform == "Torrent" %}
<li class="downloads"><span class="icon-torrent"></span><a class="orange" href="{{ torrent.link }}">{{ torrent.platform }}</a> | <a class="orange" href="{{ torrent.magnet }}">Magnet</a></li>
{% else %}
<li class="downloads"><span class="{{ entry.icon }}"></span><a class="orange" href="{{ entry.link }}">{{ entry.platform }}</a></li>
{% endif %}
{% endunless %}
{% endfor %}
</ul>
Expand All @@ -189,7 +209,11 @@ meta_descr: downloads.intro
<div class="col-md-12 col-sm-12 col-xs-12">
<p><i>{% t downloads.currentversion %}:</i> {{ entry.vers }}</p>
<ul>
<li class="downloads"><span class="{{ entry.icon }}"></span><a class="orange" href="{{ entry.link }}">{{ entry.platform }}</a></li>
{% if entry.platform == "Torrent" %}
<li class="downloads"><span class="icon-torrent"></span><a class="orange" href="{{ torrent.link }}">{{ torrent.platform }}</a> | <a class="orange" href="{{ torrent.magnet }}">Magnet</a></li>
{% else %}
<li class="downloads"><span class="{{ entry.icon }}"></span><a class="orange" href="{{ entry.link }}">{{ entry.platform }}</a></li>
{% endif %}
</ul>
</div>
{% endif %}
Expand Down
Binary file added img/download.avif
Binary file not shown.
Binary file added img/magnet.avif
Binary file not shown.
Loading