linux-headers: drop rsync dep, add new version (#39867)

This commit is contained in:
Harmen Stoppels 2023-09-15 17:23:29 +02:00 committed by GitHub
parent bd442fea40
commit 0280ac51ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.package import *
@ -14,6 +16,7 @@ class LinuxHeaders(Package):
list_url = "https://www.kernel.org/pub/linux/kernel"
list_depth = 2
version("6.5.2", sha256="2027e14057d568ad3ddc100dadf4c8853a49b031270478a61d88f6011572650f")
version("6.2.8", sha256="fed0ad87d42f83a70ce019ff2800bc30a855e672e72bf6d54a014d98d344f665")
version("4.9.10", sha256="bd6e05476fd8d9ea4945e11598d87bc97806bbc8d03556abbaaf809707661525")
@ -24,4 +27,12 @@ def setup_build_environment(self, env):
env.unset("ARCH")
def install(self, spec, prefix):
make("headers_install", "INSTALL_HDR_PATH={0}".format(prefix))
make("headers")
src, dst = join_path("usr", "include"), join_path(prefix, "include")
# This copy_tree + ignore is really poor API design, but the it avoids
# running make install_headers which depends on rsync.
copy_tree(
src, dst, ignore=lambda f: os.path.isfile(join_path(src, f)) and not f.endswith(".h")
)