Skip to content

Commit

Permalink
package: libsodium update URL to GitHub (#44090)
Browse files Browse the repository at this point in the history
Problem: the libsodium download endpoints are not reliable,
they fail multiple times a day for several of our automated
pipelines.
Solution: use the GitHub releases and branches.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed May 9, 2024
1 parent 71b035e commit 7df35d0
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions var/spack/repos/builtin/packages/libsodium/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ class Libsodium(AutotoolsPackage):
decryption, signatures, password hashing and more."""

homepage = "https://download.libsodium.org/doc/"
url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.13.tar.gz"
list_url = "https://download.libsodium.org/libsodium/releases/old"
url = "https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19.tar.gz"
git = "https://github.com/jedisct1/libsodium.git"

license("ISC")

version("master", branch="master")
version("stable", branch="stable")
version("next", branch="next")

version("1.0.19", sha256="018d79fe0a045cca07331d37bd0cb57b2e838c51bc48fd837a1472e50068bbea")
version("1.0.18", sha256="6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1")
version("1.0.17", sha256="0cc3dae33e642cc187b5ceb467e0ad0e1b51dcba577de1190e9ffa17766ac2b1")
Expand All @@ -32,14 +36,6 @@ class Libsodium(AutotoolsPackage):
version("1.0.0", sha256="ced1fe3d2066953fea94f307a92f8ae41bf0643739a44309cbe43aa881dbc9a5")
version("0.7.1", sha256="ef46bbb5bac263ef6d3fc00ccc11d4690aea83643412919fe15369b9870280a7")

def url_for_version(self, version):
url = "https://download.libsodium.org/libsodium/releases/"
if version < Version("1.0.16"):
url += "old/unsupported/"
elif version < Version("1.0.17"):
url += "old/"
return url + f"libsodium-{version}.tar.gz"

def patch(self):
# Necessary on ppc64le / aarch64, because Spack tries to execute these scripts
# to check if they work (see lib/spack/spack/build_systems/autotools.py).
Expand Down

0 comments on commit 7df35d0

Please sign in to comment.