diff options
author | zv-io <30916613+zv-io@users.noreply.github.com> | 2023-11-04 06:21:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-04 12:21:12 +0100 |
commit | 88ee3a0fba3cc806d2cddbad9740dd2c67ac8a4e (patch) | |
tree | 196ef135432a57aec12da5ef242ae134f3f15d82 /var | |
parent | f50377de7f087868dd481b4129694b85e3594ba6 (diff) | |
download | spack-88ee3a0fba3cc806d2cddbad9740dd2c67ac8a4e.tar.gz spack-88ee3a0fba3cc806d2cddbad9740dd2c67ac8a4e.tar.bz2 spack-88ee3a0fba3cc806d2cddbad9740dd2c67ac8a4e.tar.xz spack-88ee3a0fba3cc806d2cddbad9740dd2c67ac8a4e.zip |
linux-headers: support multiple versions (#40877)
The download URL for linux-headers was hardcoded to 4.x;
we need to derive the correct URL from the version number.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/linux-headers/package.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/linux-headers/package.py b/var/spack/repos/builtin/packages/linux-headers/package.py index 1236a25ce6..8e1d995695 100644 --- a/var/spack/repos/builtin/packages/linux-headers/package.py +++ b/var/spack/repos/builtin/packages/linux-headers/package.py @@ -20,6 +20,10 @@ class LinuxHeaders(Package): version("6.2.8", sha256="fed0ad87d42f83a70ce019ff2800bc30a855e672e72bf6d54a014d98d344f665") version("4.9.10", sha256="bd6e05476fd8d9ea4945e11598d87bc97806bbc8d03556abbaaf809707661525") + def url_for_version(self, version): + url = "https://www.kernel.org/pub/linux/kernel/v{0}.x/linux-{1}.tar.xz" + return url.format(version.up_to(1), version) + def setup_build_environment(self, env): # This variable is used in the Makefile. If it is defined on the # system, it can break the build if there is no build recipe for |