diff options
author | Zach van Rijn <me@zv.io> | 2023-11-04 14:08:39 +0000 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2023-11-04 14:14:57 +0000 |
commit | 39d9d4a84fb8780da4228289daf423aaf28d739f (patch) | |
tree | d859c27c83d7dc0b8cf5ce7dc3747ec29d0f78a0 /user/spack/40877.patch | |
parent | 626845ccad5cd97951ffe658d0580e3c20255644 (diff) | |
download | packages-39d9d4a84fb8780da4228289daf423aaf28d739f.tar.gz packages-39d9d4a84fb8780da4228289daf423aaf28d739f.tar.bz2 packages-39d9d4a84fb8780da4228289daf423aaf28d739f.tar.xz packages-39d9d4a84fb8780da4228289daf423aaf28d739f.zip |
user/spack: fix broken 'linux-headers' package.
See: https://github.com/spack/spack/issues/40334
Also:
* Upstream Spack assumes that 'linux-headers' is
always installed on the system, since it is a
dependency of glibc. As 'openssl' requires it,
make the dependency explicit. There are likely
many more occurrences of this that should be
reported and fixed upstream.
Diffstat (limited to 'user/spack/40877.patch')
-rw-r--r-- | user/spack/40877.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/user/spack/40877.patch b/user/spack/40877.patch new file mode 100644 index 000000000..4aa4368ff --- /dev/null +++ b/user/spack/40877.patch @@ -0,0 +1,26 @@ +From 1af592210d9190147e097fe26ddaa583a962557e Mon Sep 17 00:00:00 2001 +From: Zach van Rijn <me@zv.io> +Date: Fri, 3 Nov 2023 19:06:46 -0500 +Subject: [PATCH] linux-headers: support multiple versions (#40334) + +The download URL for linux-headers was hardcoded to 4.x; +we need to derive the correct URL from the version number. +--- + var/spack/repos/builtin/packages/linux-headers/package.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/var/spack/repos/builtin/packages/linux-headers/package.py b/var/spack/repos/builtin/packages/linux-headers/package.py +index 1236a25ce691e..8e1d995695b06 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 |